Mixins
element
element
@mixin element (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$element |
Element's name |
String
|
— |
modifier
modifier
@mixin modifier (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$modifier |
Modifier's name |
String
|
— |
when-is
when-is
@mixin when-is (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$element-selector |
Element selector |
String
|
— |
Placeholders
Selectors
Variables
$nice-glyphs
nice-glyphs
$nice-glyphs: (
bullet: '2022',
copyright: '00a9',
greater-than: '003e',
hyphen-minus: '002d',
left-double-quotation-mark: '201C',
less-than: '003c',
plus: '002b',
punc-space: '02008',
zero-width-space: '0200B'
// Add more entity codes here as and when they're needed
);
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
bullet
|
Bullet (•) |
String
|
2022
|
copyright
|
Copyright symbol (©) |
String
|
00a9
|
greater-than
|
Greater than symbol (>) |
String
|
003e
|
hyphen-minus
|
Hyphen minus (-) |
String
|
002d
|
left-double-quotation-mark
|
Left double quotation mark (“) |
String
|
201C
|
less-than
|
Less than symbol (<) |
String
|
003c
|
plus
|
Plus sign (+) |
String
|
002b
|
punc-space
|
Punctuation space (small, width of a comma) |
String
|
02008
|
zero-width-space
|
Zero width space |
String
|
0200B
|
Function
get-glyph
get-glyph
@function get-glyph (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$names |
The name(s) of the glyph(s) to get |
argList
|
— |
last-index
last-index
@function last-index (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$list |
list to search |
List
|
— |
$value |
value to be searched for |
Any
|
— |
strip-unit
strip-unit
@function strip-unit (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$num |
The number whose units you wish to strip. |
Number
|
— |
em
em
@function em (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$pixels |
The px-value you wish to convert to ems. No px unit necessary (e.g. 20 is fine, so is 20px). Passing a list will result in a list of em values (see examples). |
Number
|
— |
$base |
A base-value with which to calculate the em-value |
Number
|
$nice-base-font-size
|
rem
rem
@function rem (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$pixels |
The px-value you wish to convert to rems. No px unit necessary (e.g. 20 is fine, so is 20px). Passing a list will result in a list of rem values (see examples). |
Number
|
— |
$base |
A base-value with which to calculate the em-value |
Number
|
$nice-base-font-size
|