CSS for common HTML elements
CSS classes for all the most common HTML elements.Fonts Families and dynamic sizes
Below are the list of default fonts that come with PCF.
body {font-family: 'Helvetica Neue', Helvetica, sans-serif;}
Pure CSS Framework's Font
The www.purecssframework.com site uses "Open Sans" a google font. If you would like to add this same font to your project, add the following to the body font stack:
body {font-family: 'open sans', Helvetica Neue', Helvetica, sans-serif;}
And you must include the link to the google font:
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
Dynamic Font Sizing
Below is an example of the body font size. Most PCF font sizes use the viewport width to determine text size, with a minimum set em size. Viewport width is great, the font size will dynamicly change depending on the screen/device size. No need to write media queries to change fonts in different resolutions.
These size can be changed or overwritten to use pixels, or points if needed.
body {font-size: calc(.7em + .2vw);}
Media Queries Responsive sizing for PCF
Below are the PCF standard media queries, these quires are used for the grid system classes as well: .xl, .lg, .md, .sm, .xs
Extra large Desktops (classes with "xl")
@media all and (min-width: 1601px){}
Large Desktops (classes with "lg")
@media all and (max-width: 1600px){}
Meduim Desktops and Tablets (classes with "md")
@media all and (max-width: 1024px){}
Large Phones (classes with "sm")
@media all and (max-width: 767px){}
Smaller Phones (classes with "xs")
@media all and (max-width: 375px){}
You can use classes to show in just certain media queries. Add any classes to elements to make them show just on a certain media quiery size. You can also add them together to show in multiple sizes if you wish.
- Show only in Extra Large Viewport:
class="xl"
- Show only in Large Viewport:
class="lg"
- Show only in Meduim Viewport:
class="md"
- Show only in Small Viewport:
class="sm"
- Show only in Extra Small Viewport:
class="xs"
Add "-hide" to hide in only the perticular viewport size, for example class="xl-hide"
will set that element to hide in the extra large viewport setting.
You are now seeing:
class="xl"
class="lg"
class="md"
class="sm"
class="xs"
Resize your browser to see the class change.
Common Classes Some useful classes you can add to elements
Floats/Clears | Hide/Show
Float Left: .left
Float Right: .right
Clear: .clear
Clear Fix: .clearfix:after
(add to parent element to clear)
Hide Element: .hide
Show Block Element: .show
Show Inline Block Element: .show-inline-block
Show Inline Element: .inline
Lines - Spacers
Line: .line
Dotted Line: .line-dotted
Dashed Line: .line-dashed
Extra Small Spacer (10px): .spacer-xs
Small Spacer (20px): .spacer-sm
Medium Spacer (40px): .spacer-md
Large Spacer (60px): .spacer-lg
Extra Large Spacer (80px): .spacer-xl
Text Adjustments - Positioners
Align Text Left: .text-left
Align Text Right: .text-right
Align Text Center: .text-center
Text Uppercase: .text-uppercase
Text Lowercase: .text-lowercase
Text Capitalize: .text-capitalize
Text No Wrap: .no-wrap
Text Smaller 80%: .text-smaller
Text Bigger 120%: .text-bigger
Position Static: .static
Position Relative: .relative
Position Fixed: .fixed
(Adds z-index: 50)
Padding
Extra Small Padding (4px): .padding-xs
Small Padding (8px): .padding-sm
Medium Padding (16px): .padding-md
Large Padding (32px): .padding-lg
Extra Large Padding (64px): .padding-xl
Containers
Main Container: .main-container
(Puts 5% padding on left and right sides, container width set to 100%)
If you want a container to only reach a certain size update the max-width on the class. Below are a few pre-made sizes.
Main Container (max-size 1170px ): class="main-container max-1170"
Main Container (max-size 1400px ): class="main-container max-1400"
Main Container (max-size 1600px ): class="main-container max-1600"
Main Container (max-size 1800px ): class="main-container max-1800"
Rounded Corners
Set any elements to have rounded corners, to see themyou may need a border or background-color on the element.
Rounded Corners (set to 5px): class="rounded-corners"
More Rounded Corners (set to 12px): class="rounded-more-corners"
You can also set just the top or the bottom corners to be rounded
Top/Bottom Only Rounded Corners (set to 5px):
class="rounded-corners-top"
class="rounded-corners-bottom"
Top/bottom Only More Rounded Corners (set to 12px):
class="rounded-more-corners-top"
class="rounded-more-corners-bottom"
Circle - Only works if object is a perfect square:
class="circle"
No rounded corners:
class="no-rounded"
Z-Index settings
z-index: 5 .layer-low
z-index: 25 .layer-med
z-index: 50 .layer-high
z-index: 100 .layer-highest
Opacity Settings
opacity: 0% .opacity-0
opacity: 25% .opacity-25
opacity: 50% .opacity-50
opacity: 100% .opacity-100
Shims Margin and padding shorthand classes
Assign margin or padding values to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. Classes are built ranging from 0px to 64px.The classes are named using the format {property}{sides}-{size}
.
Where property is one of:
m
- for classes that setmargin
p
- for classes that setpadding
Where sides is one of:
t
- for classes that setmargin-top
orpadding-top
b
- for classes that setmargin-bottom
orpadding-bottom
l
- for classes that setmargin-left
orpadding-left
r
- for classes that setmargin-right
orpadding-right
x
- for classes that set both*-left
and*-right
y
- for classes that set both*-top
and*-bottom
- blank - for classes that set a
margin
orpadding
on all 4 sides of the element
Where size is one of:
0
- for classes that eliminate themargin
orpadding
by setting it to0
xs
- (by default) for classes that set themargin
orpadding
to4px
sm
- (by default) for classes that set themargin
orpadding
to8px
md
- (by default) for classes that set themargin
orpadding
to16px
lg
- (by default) for classes that set themargin
orpadding
to32px
xl
- (by default) for classes that set themargin
orpadding
to64px
Examples
Here are some representative examples of these classes:
Flex Grid System A More powerful grid system!
Grid systems are used for creating page layouts through a series of columns that hold your content. Flex grid is supported by all modern browsers, no floats to deal with, flex grids add all the flexability that flexbox adds, learn more about flex-box and add any of the CSS needed to custom classes you can create.All grids have a 12 pixel padding assigned to each column by default. Flex rows need to have a parent div of
class="flex-grid"
.
Flex Grid special classes
Reverse Columns: .flex-grid.reverse
Flex Direction Column: .flex-grid.column
Flex Direction Column Reverse: .flex-grid.column-reverse
Flex Grid System: 12 Column One of the most common grid setups
Below is an example of tweleve columns that will be equal across the area of the container. Remember all the col-(number) need to add up to tweleve since this is using the 12 column grid system.
<div class="flex-grid">
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
</div>
Responsive 12 Columns
Change grid column sizes depending on screen width, as long as the numbers across each col add up to tweleve it will span perfectly across the space. Below you can see a line up of classes that will change between 4 cols at meduim screen size and a full row of 12 cols at small size. Please click here if you want to see the PCF responsive sizes.
width="100%"
for easy responsive access.
Resize the browser viewport to below 767px and you willsee all cols will expand 100% except the col with the class .col-6-sm
.
<div class="flex-grid">
<div class="col-6 col-4-md col-6-sm">.col-6 .col-4-md .col-6-sm</div>
<div class="col-3 col-4-md">.col-3 .col-4-md</div>
<div class="col-3 col-4-md">.col-3 .col-4-md</div>
</div>
Flex Grid System: 10 Column Grid layout by 10's
I have found I sometimes need to divide page items up by 10's and 12's don't seem to accommodate rows of 5 well.
Below is an example of ten columns that will be equal across the area of the container just use the extra class .tenths
. Remember all the col-(number) need to add up to ten since this is using the 10 column grid system.
<div class="flex-grid tenths">
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
<div class="col-1">.col-1</div>
</div>
Responsive 10 Columns
Change grid column sizes depending on screen width, as long as the numbers across each col add up to ten it will span perfectly across the space. Below you can see a line up of classes that will change between tenths, working just like the tweleve column grid. Please click here if you want to see the PCF default sizes.
<div class="flex-grid tenths">
<div class="col-5 col-5-md col-10-sm">.col-5 .col-5-md .col-10-sm</div>
<div class="col-2 col-4-md col-10-sm">.col-2 .col-4-md .col-10-sm</div>
<div class="col-3 col-1-md col-10-sm">.col-3 .col-1-md .col-10-sm</div>
</div>
All Grids are Nestable
Use grids within grids for more complicated layouts.
<div class="flex-grid ">
<div class="col-6 col-4-md col-12-sm">
.col-6 .col-4-md .col-12-sm
<div class="flex-grid grid-example">
<div class="col-6 col-4-md col-12-sm">.col-6 .col-4-md .col-12-sm</div>
<div class="col-3 col-4-md col-12-sm">.col-3 .col-4-md .col-12-sm</div>
<div class="col-3 col-4-md col-12-sm">.col-3 .col-4-md .col-12-sm</div>
</div>
</div>
<div class="col-3 col-4-md col-12-sm">.col-3 .col-4-md .col-12-sm</div>
<div class="col-3 col-4-md col-12-sm">.col-3 .col-4-md .col-12-sm</div>
</div>
Grid Ordering
Change grid column ordering by adding a style or class. This is usually good to use in media queries to change the order of sections.
Simply use one of our pre-built classes for each column with sizing optionslike this: .order-2-md
. This will set the column to be in the second spot in the medium resolution setting.
Resize your browser to see the orders change depending on resolution.
<div class="flex-grid">
<div class="col-4 order-2 order-3-md order-1-sm">
First DIV on page
<div class="line"></div>
.col-4 .order-2 .order-3-md .order-1-sm
</div>
<div class="col-4 order-1 order-1-md order-2-sm">
Second DIV on page
<div class="line"></div>
.col-4 .order-1 .order-1-md .order-2-sm
</div>
<div class="col-4 order-3 order-2-md order-3-sm">
Third DIV on page
<div class="line"></div>
.col-4 .order-3 .order-2-md .order-3-sm
</div>
</div>
Column Offsets
You can offset columns from the left by adding .col-offset
and the number of cols you wouldlike to offset, see below.
<div class="flex-grid ">
<div class="col-4">.col-4</div>
<div class="col-4 col-offset-4">.col-4 .col-offset-4</div>
</div>
<div class="flex-grid grid-example">
<div class="col-3 col-offset-3">.col-3 .col-offset-3</div>
<div class="col-3 col-offset-3">.col-3 .col-offset-3</div>
</div>
<div class="flex-grid grid-example">
<div class="col-6 col-offset-3">col-6 col-offset-3</div>
</div>
Responsive Offsets and Offset Clearing
Offsets can be used responsively as well, like for example change the offset when showing in a small viewport: class="col-3 col-offset-3-sm"
Sometimes you may want to clear an offset completely rather than change it responsively, to do this use this class and add the viewport size you would like it eliminated in. The class below clears the offest in small viewports: .col-offset-clear-sm
Headers
Below are just the PCF standard header tag defaults. PCF sets all header to a normal font weight, if you wouldlike bolder headers just add the bold class <h1 class="bold"></h1>
Regular Headers
Below are the standard headers H1 through H6.
H1 - header
H2 - header
H3 - header
H4 - header
H5 - header
H6 - header
Inline Secondary Text
To use secondary text just put a span inside the header tag: <h1>Heading <small>Secondary text ...</small></h1>
Remember not to make these too long as they may wrap in smaller devices.
H1 Secondary text
H2 Secondary text
H3 Secondary text
H4 Secondary text
H5 Secondary text
H6 Secondary text
Double Lined Headers
Sometimes you need longer headers with a smaller sub-header under it for some design situations.
Wrap your code in a div with this class: <div class="dbl-lined-header">
.
The main line can be h1-h4 tags and followed by a <small>
tag which will have the secondary line under it.
H1 Header being used
When and H1 header tag is being used the span tag that contains the second line will be matched.H2 Header being used
When and H2 header tag is being used the span tag that contains the second line will be matched.H3 Header being used
When and H3 header tag is being used the span tag that contains the second line will be matched.H4 Header being used
When and H4 header tag is being used the span tag that contains the second line will be matched.Centered Version
Don't forget you can add classes to center the alignment of header.class="dbl-lined-header text-center"
<div class="dbl-lined-header">
<h1>H1 Header being used</h1>
<small>When and H1 header tag is being used the span tag that contains the second line will be matched.</small>
</div>
Indents
Add any of the indent classes below to any block or inline-block element.
.indent-xs
.indent-sm
.indent-md
.indent-lg
.indent-xl
Tables
Basic Table
Put this class in the table tag <table class="tbl">
ID | First Name | Last Name | Level | Active |
---|---|---|---|---|
1 | John | Doe | Noob | ✔ Active |
2 | David | Ryan | Veteran | ✔ Active |
3 | Eric | Stevenson | Novice | ✘ Not Active |
<table class="tbl">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Level</th>
<th>Active</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td>John</td>
<td>Doe</td>
<td>Noob</td>
<td>✔ Active</td>
</tr>
<tr>
<th>2</th>
<td>David</td>
<td>Ryan</td>
<td>Veteran</td>
<td>✔ Active</td>
</tr>
<tr>
<th>3</th>
<td>Eric</td>
<td>Stevenson</td>
<td>Novice</td>
<td>✘ Not Active</td>
</tr>
</tbody>
</table>
Bordered Table
Put this class in the table tag <table class="tbl bordered">
,
You can also add a background color to the table headings by adding the class "th-bg"
like the table below. This will give background colors to any <th> tag within the table.
The class code looks like this: <table class="tbl bordered th-bg">
ID | First Name | Last Name | Level | Active |
---|---|---|---|---|
1 | John | Doe | Noob | ✔ Active |
2 | David | Ryan | Veteran | ✔ Active |
3 | Eric | Stevenson | Novice | ✘ Not Active |
Stripe Table Rows
Making striped tables is easy, just decide if you would like stripes to be on even rows or odd rows.
Even row stripes <table class="tbl striped-even">
or odd colored rows <table class="tbl striped-odd">
ID | First Name | Last Name | Level | Active |
---|---|---|---|---|
1 | John | Doe | Noob | ✔ Active |
2 | David | Ryan | Veteran | ✔ Active |
3 | Eric | Stevenson | Novice | ✘ Not Active |
4 | Eric | Stevenson | Novice | ✘ Not Active |
Hover Row Table
Put this class in the table tag <table class="tbl row-hover">
ID | First Name | Last Name | Level | Active |
---|---|---|---|---|
1 | John | Doe | Noob | ✔ Active |
2 | David | Ryan | Veteran | ✔ Active |
3 | Eric | Stevenson | Novice | ✘ Not Active |
Responsive Table
Simply put a div with this class in it around your table <div class="tbl-responsive">
.
The table will gain a horizontal scroll bar when not wide enough,on mobiledevices it will be swipable.
ID | First Name | Last Name | Level | Active | More Stuff | More Stuff | More Stuff | More Stuff | More Stuff | More Stuff |
---|---|---|---|---|---|---|---|---|---|---|
1 | John | Doe | Noob | ✔ Active | Stuff Here | Stuff Here | Stuff Here | Stuff Here | Stuff Here | Stuff Here |
2 | David | Ryan | Veteran | ✔ Active | Stuff Here | Stuff Here | Stuff Here | Stuff Here | Stuff Here | Stuff Here |
3 | Eric | Stevenson | Novice | ✘ Not Active | Stuff Here | Stuff Here | Stuff Here | Stuff Here | Stuff Here | Stuff Here |
<div class="tbl-responsive">
<table class="tbl">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Level</th>
<th>Active</th>
<th>More Stuff</th>
<th>More Stuff</th>
<th>More Stuff</th>
<th>More Stuff</th>
<th>More Stuff</th>
<th>More Stuff</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td>John</td>
<td>Doe</td>
<td>Noob</td>
<td>✔ Active</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
</tr>
<tr>
<th>2</th>
<td>David</td>
<td>Ryan</td>
<td>Veteran</td>
<td>✔ Active</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
</tr>
<tr>
<th>3</th>
<td>Eric</td>
<td>Stevenson</td>
<td>Novice</td>
<td>✘ Not Active</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
<td>More Stuff</td>
</tr>
</tbody>
</table>
</div>
Forms
Add class="form-elements"
to wrapping containers, this will position and style elements correctly.
By default all form basic elements are set to 100% width which you can change depending on a container they are in.
You can add rounded edges to your form inputs by adding <input type="text" class="rounded-corners">
or <input type="text" class="rounded-more-corners">
,
by default all form elements are squared.
Basic Form Most common form design
Example Code<form>
<div class="form-elements">
<label for="email">Email address</label>
<input type="email" id="email" placeholder="Email">
</div>
<div class="form-elements">
<label for="password">Password</label>
<input type="password" id="password" placeholder="Password">
</div>
<div class="form-elements">
<label for="select_drop">Select</label>
<div class="select-element">
<select id="select_drop">
<option>Select</option>
<option>Select</option>
<option>Select</option>
<option>Select</option>
<option>Select</option>
</select>
<div class="select-arrow"></div>
</div>
</div>
<div class="form-elements">
<label for="file">File input</label>
<input type="file" id="exampleInputFile">
</div>
<div class="form-elements">
<label class="form-check-radio">
<input type="checkbox"> Add a check box
</label>
</div>
<div class="form-elements">
<label class="form-check-radio toggle-check">
<input type="checkbox">
<span class="toggle-check-box"></span>
<span class="toggle-check-text">Add a fancy toggle check box</span>
</label>
</div>
<input type="submit" class="btn primary" value="Submit">
<input type="reset" class="btn" value="Reset">
</form>
Form Horizontal Design Using Flex Grid
If you want to put labels in front of the inputs to they are horizontal you can use the grid along with the form clasess from the basic for to creat this look.
Just add this class <form class="form-horizontal">
to the form tag surrounding the form or any tag containing the form. Update the col classes
aon the grid to change how much space you would like each element to use on the page and change them as you feel fit responsively. See the example below for more information.
<form class="form-horizontal">
<div class="flex-grid form-elements">
<div class="col-2 col-12-sm">
<label for="email2">Email address:</label>
</div>
<div class="col-10 col-12-sm">
<input type="email" id="email2" placeholder="Email">
</div>
<div class="col-2 col-12-sm">
<label for="password2">Password:</label>
</div>
<div class="col-10 col-12-sm">
<input type="password" id="password2" placeholder="Password">
</div>
<div class="col-2 col-12-sm">
<label for="comments">Comments:</label>
</div>
<div class="col-10 col-12-sm">
<textarea id="comments" placeholder="Comments"></textarea>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<label class="form-check-radio">
<input type="checkbox"> Add a check box
</label>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<div class="form-elements">
<label class="form-check-radio toggle-check">
<input type="checkbox">
<span class="toggle-check-box"></span>
<span class="toggle-check-text">Add a fancy toggle check box</span>
</label>
</div>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<input type="submit" class="btn primary" value="Submit">
<input type="reset" class="btn" value="Reset">
</div>
</div>
</form>
Condensed Horizontal Form
If you like the horizontal form but want it condensed for a different look or just to save space you can use the condensed form below.
Just apply the horizontal class along with the condensed class like this to the form tag or any container tag wrapped around the form
<form class="form-horizontal form-condensed">
. In mobile sizes the input labels will hide to keep true to the condensed feel.
<form class="form-horizontal form-condensed">
<div class="flex-grid form-elements">
<div class="col-2 col-12-sm sm-hide">
<label for="email3">Email address:</label>
</div>
<div class="col-10 col-12-sm">
<input type="email" id="email3" placeholder="Email">
</div>
<div class="col-2 col-12-sm sm-hide">
<label for="password3">Password:</label>
</div>
<div class="col-10 col-12-sm">
<input type="password" id="password3" placeholder="Password">
</div>
<div class="col-2 col-12-sm sm-hide">
<label for="pick4">Select:</label>
</div>
<div class="col-10 col-12-sm select-element">
<select id="pick4">
<option>Select</option>
<option>Select</option>
<option>Select</option>
<option>Select</option>
<option>Select</option>
</select>
<div class="select-arrow"></div>
</div>
<div class="col-2 col-12-sm sm-hide">
<label for="comments">Comments:</label>
</div>
<div class="col-10 col-12-sm">
<textarea id="comments" placeholder="Comments"></textarea>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<label class="form-check-radio">
<input type="checkbox"> Add a check box
</label>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<div class="form-elements">
<label class="form-check-radio toggle-check">
<input type="checkbox">
<span class="toggle-check-box"></span>
<span class="toggle-check-text">Add a fancy toggle check box</span>
</label>
</div>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<input type="submit" class="btn primary" value="Submit">
<input type="reset" class="btn" value="Reset">
</div>
</div>
</form>
Inline Form
To create an inline form, a form in one row,
Just apply the inline class like this to the form tag or any container tag wrapped around the form
<form class="form-inline">
. In mobile sizes form will stack. To make sure the
button height matches the form add one extra class .form-inline-btn
.
<form class="form-inline form-elements">
<input type="email" placeholder="Email">
<input type="password" placeholder="Password">
<label class="form-check-radio">
<input type="checkbox"> Add a check box
</label>
<input type="submit" class="btn primary form-inline-btn" value="Submit">
</form>
Read Only
Example of a read only input, just add readonly
and class .form-read-only
to the input and make sure you use the class .form-elements
on the wrapping element.
Disabled
Example of a disabled input, just add .disabled
to the element.
<form class="form-elements">
<div class="form-elements">
<input type="text" class="disabled" placeholder="Disabled" disabled>
</div>
</form>
Example handling a full form being disabled you will need to use the fieldset tag around the form <fieldset disabled>
.
<form class="form-horizontal form-condensed">
<fieldset disabled>
<div class="flex-grid form-elements">
<div class="col-2 col-12-sm sm-hide">
<label for="name4">Name:</label>
</div>
<div class="col-10 col-12-sm">
<input type="text" id="name4" placeholder="Name">
</div>
<div class="col-2 col-12-sm sm-hide">
<label for="pick6">Select:</label>
</div>
<div class="col-10 col-12-sm select-element">
<select id="pick6">
<option>Select</option>
<option>Select</option>
<option>Select</option>
<option>Select</option>
<option>Select</option>
</select>
<div class="select-arrow"></div>
</div>
<div class="col-2 col-12-sm sm-hide">
<label for="email4">Email address:</label>
</div>
<div class="col-10 col-12-sm">
<input type="email" id="email4" placeholder="Email">
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<label class="form-check-radio">
<input type="checkbox"> Add a check box
</label>
</div>
<div class="col-10 col-offset-2 col-12-sm col-offset-clear-sm">
<input type="submit" class="btn primary" value="Submit">
<input type="reset" class="btn" value="Reset">
</div>
</div>
</fieldset>
</form>
Form Input Sizing
Put the size class in with the form-elements class to change input and label sizes class="form-elements elements-lg"
.
Extra Large: class="form-elements elements-xl"
Large: class="form-elements elements-lg"
Small: class="form-elements elements-sm"
Extra Small: class="form-elements elements-xs"
Form Line Design
Add class form-line-design to any wraping element to make the form look like the one below. I have put the class in the form tag in the example <form class="form-line-design">
.
Buttons
Button classes can be applied to any HTML tags. Add extra classes for sizes,colors and styles,learn more below.
Rounded Buttons
Buttons come standard as having rounded corners, you can also remove the rounded corners by adding.no-rounded
class to the button.
You can also add an even more pill shaped radius,please take a look at border raduis classes here:rounded classes
Default Button
Example code for default size and colored button: <a href="#" class="btn"></a>
Ghost Button
Example code for a ghost button onlight background: <a href="#" class="btn-ghost"></a>
Ghost Button Inverted
Example code for a ghost button on dark backgrounds: <a href="#" class="btn-ghost inverted"></a>
Ghost Button Dynamic Color
Example code for a ghost button that will switch to work on light or dark backgrounds depending on a parent .dark
class backgrounds: <a href="#" class="btn-ghost dynamic"></a>
Button Colors
Example code for button with the primary color: <a href="#" class="btn primary"></a>
I always seem need a black, white or transparent button options as well.
.btn .black .btn .white .btn .transButton Sizes
Example code for extra small button: <a href="#" class="btn primary btn-xs"></a>
Button Active State
If you wouldlike a button to look like it is set to active: <a href="#" class="btn primary active"></a>
Button Full Width
Example code for full width button (100% width): <a href="#" class="btn primary full-width"></a>
Button with Arrows
Example code for arrows: <a href="#" class="btn"><i class="arrow-down"></i></a>
Glowing Buttons
Below are examples of buttons that glow. You must use one of the standard button color classes. <a href="#" class="btn primary glow"></a>
Contextual Colors
All colors are based on these colors which you can modify from the themes.css file. Below are the default colors for the framework, all default colors use RGBA this way it is easy to change alpha transparency.
Background Colors | Solid colors are given set font color
Background Colors at 25% Strength | Font colors not set for these backgrounds
Use Light Versions for Table Rows or Cells
Example code: <tr class="success-light">
or <td class="success-light">
or <th class="success-light">
ID | First Name | Last Name | Level | Active |
---|---|---|---|---|
1 | John | Doe | Noob | ✔ Active |
2 | David | Ryan | Veteran | ✔ Active |
3 | Eric | Stevenson | Novice | ✘ Not Active |
Text Colors
Example code: <span class="text-primary">text</span>
.text-primary | .text-secondary | .text-info |
.text-success | .text-warning | .text-danger |
.text-white - Not visible on white | .text-black - Not visible on black | .text-muted |
Colored Borders
Call Outs / Call Out Colors
Call Out Title
Just use a div tag with class.call-out
along with an h4 header tag inside.
<div class="call-out">
<h4 class="bold">Call Out Title</h4>
Just use a div tag with class <code>.call-out</code> along with an h4 header tag inside.
</div>
Primary Color
Div tag withclass="primary"
Secondary Color
Div tag withclass="secondary"
Info Color
Div tag withclass="info"
Success Color
Div tag withclass="success"
Warning Color
Div tag withclass="warning"
Danger Color
Div tag withclass="danger"
Breadcrumbs
Examples of breadcrumb menus, not really much to this compenent. The "/" are in span tags and make the section seperators easy to change up with any other character.
Example Code<div class="breadcrumbs">
<a href="#">Home</a>
<span>/</span>
<a href="#">Products</a>
<span>/</span>
Hockey Sticks
</div>
Icons
PCF uses a few css built in designed icons which are super light weight but can't be sized or colored as easily as font type icons. CSS icons in PCF are found in the responsive header (hamburger and profile icons) along with drop button arrow icons and standard alerts. All PCF icons can easily be switched out with any of the third party icons below.
IcoMoon
IcoMoon is pretty cool because they allow you to pick and choose icons to make into a font on the fly! By doing this you only use the icons you actually need and that can keep your site light weight.
Font Awesome
Font Awesome is another good icon choice you can add to PCF. They have tons of great icons, the only issue I have with it is not being able to customize which icons you want.As of now you have to download the whole library which has more icons than anyone can need for one site which is a big load. There is some good news, many sites do use font awesome so there is a good chance users have all ready downloaded the fonts.