Borders - pressden/emma GitHub Wiki
The border
set of utility classes allows you to create flexible borders on all 4 sides of an element. Borders on each side can be created independently, although the same color must be used for all sides.
border
Anytime you make a border, you must add the border
class, along with any other options you choose to use.
Location
Location and Size are defined together in a single class. Follows the format b[location]-[size]
.
b-[size]
- provides a border around all sidesby-[size]
- provides a top and bottom borderbx-[size]
- provides a left and right borderbt-[size]
- provides a top borderbb-[size]
- provides a bottom borderbl-[size]
- provides a left borderbr-[size]
- provides a right border
Size
Location and Size are defined together in a single class. Follows the format b[location]-[size]
.
b[location]-sm
- provides a 1px border at the chosen location(s)b[location]-md
- provides a 3px border at the chosen location(s)b[location]-lg
- provides a 5px border at the chosen location(s)
Color
Color is assigned as a separate class, and is optional (borders will be black by default). Borders colors cannot be assigned on a per-location basis. Any colors in the editor color palette can be used. Follows the format b-[color-name]
.
b-primary
- assigns Primary color to border(s)b-primary-support
- assigns Primary Support color to border(s)- etc
Color names can be found by selecting any element that allows for color selection, and mousing over one of the color swatches to view its name.
Examples
border b-md
- creates a 3px black border around all 4 sides of an elementborder by-lg b-primary
- creates a 5px border on the top and bottom of an element using the Primary colorborder bl-lg bb-md b-secondary-support
- creates a 5px border on the left and a 3px border on the bottom of an element using the Secondary Support color