General
functions
[private] get-font-scale-value
@function get-font-scale-value($position, $map: $shevy) { ... }Description
Returns the font scale value at a given position in the list
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$position | Position of scale value to retrieve | Number | —none |
$map | Map from which to retrieve font scale value | Map | $shevy |
Returns
Number —Font scale value at given position
Requires
- [function]
settings
Used by
- [mixin]
headings
base-font-size
@function base-font-size($map: $shevy) { ... }Description
Returns the base font size of current settings
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Returns
Value —Value of base-font-size setting
Requires
- [function]
settings
Used by
- [function]
line-height-spacing-math - [function]
base-spacing-math - [mixin]
headings - [mixin]
body - [mixin]
content
base-font-unit
@function base-font-unit($map: $shevy) { ... }Description
Returns the base font unit of the current settings
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Returns
String —Unit value of base font size
Requires
- [function]
settings
Used by
base-line-height
@function base-line-height($map: $shevy) { ... }Description
Returns the base line-height of the current settings
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Returns
Number —Current base-line-height setting
Requires
- [function]
settings
Used by
- [function]
line-height-spacing-math - [function]
base-spacing-math - [mixin]
headings - [mixin]
body - [mixin]
content
line-height-spacing
@function line-height-spacing($factor: 1, $map: $shevy) { ... }Description
Returns the line-height spacing, which is unaffected by proximity-factor
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$factor | A factor with which to multiply the base-spacing value | Number | 1 |
$map | Map of settings | Map | $shevy |
Returns
Value —Value of the calculated line-height
Requires
- [function]
settings - [function]
line-height-spacing-math
Used by
- [mixin]
headings
[private] line-height-spacing-math
@function line-height-spacing-math($map: $shevy) { ... }Description
Returns the line-height spacing, which is unaffected by proximity-factor
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Returns
Value —Value of base-font-size multiplied by base-line-height
Requires
- [function]
settings - [function]
base-font-size - [function]
base-line-height
Used by
- [function]
line-height-spacing
base-spacing
@function base-spacing($factor: 1, $map: $shevy) { ... }Description
Takes a factor, multiplies it with the current settings base spacing to output values that are multiples or dividends of the current vertical rhythm
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$factor | A factor with which to multiply the base-spacing value | Number | 1 |
$map | Map of settings | Map | $shevy |
Returns
Value —Value of base-spacing multiplied by the factor provided
Requires
- [function]
settings - [function]
base-spacing-math
Used by
[private] base-spacing-math
@function base-spacing-math($map: $shevy) { ... }Description
Calculates base spacing
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Returns
Value —Value of base-font-size multiplied by base-line-height, additionally multiplied by proximity factor if proximity is true
Requires
- [function]
settings - [function]
base-font-size - [function]
base-line-height
Used by
- [function]
base-spacing
[private] base-unit-multiplier
@function base-unit-multiplier($unit) { ... }Description
Creates a value equivalent to 1 of the base unit, i.e. if base unit is pixels, returns 1px
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$unit | String of unit type. Options are: 'px', 'em', or 'rem' | String | —none |
Returns
Value —a value of 1 in the given unit type
Used by
settings
@function settings($map: $shevy) { ... }Description
Merge current settings map with Shevy defaults
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Returns
Map —Map of merged settings
Requires
- [variable]
shevy-defaults
Used by
- [function]
get-font-scale-value - [function]
base-font-size - [function]
base-font-unit - [function]
base-line-height - [function]
line-height-spacing - [function]
line-height-spacing-math - [function]
base-spacing - [function]
base-spacing-math - [mixin]
headings - [mixin]
body - [mixin]
content - [mixin]
with-settings
mixins
headings
@mixin headings($map: $shevy) { ... }Description
Output the headings (h1, h2...) with the calculated settings
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | —none | Map | $shevy |
Output
Headings with calculated settings
Requires
- [function]
settings - [function]
base-font-unit - [function]
base-unit-multiplier - [function]
base-font-size - [function]
base-line-height - [function]
line-height-spacing - [function]
base-spacing - [function]
get-font-scale-value
body
@mixin body($map: $shevy) { ... }Description
Output font-size and line-height for body element
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Output
Font-size and line-height for body element
Requires
- [function]
settings - [function]
base-font-unit - [function]
base-unit-multiplier - [function]
base-font-size - [function]
base-line-height
content
@mixin content($map: $shevy) { ... }Description
Output font-size, line-height and margin-bottom for p, ol, ul, and pre elements
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | Map of settings | Map | $shevy |
Output
Font-size, line-height and margin-bottom for p, ol, ul, and pre elements
Requires
- [function]
settings - [function]
base-font-unit - [function]
base-unit-multiplier - [function]
base-font-size - [function]
base-line-height - [function]
base-spacing
with-settings
@mixin with-settings($map) { ... }Description
Temporarily use a different settings map
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$map | A map consisting of some or all $shevy settings. | Map | —none |
Content
This mixin allows extra content to be passed (through the @content directive). Role: [Merges the $map with the $shevy settings and uses this new map to do all shevy math within this content block. Restores the $shevy settings after the block.]
Requires
- [function]
settings
variables
shevy-defaults
$shevy-defaults: (
base-font-size: 1em,
base-line-height: 1.5,
base-font-scale: (3, 2.5, 2, 1.5, 1.25, 1),
margin-bottom: true,
proximity: false,
proximity-factor: .85
);Description
Default $shevy settings
Map structure
| keyName | keyDescription | keyType | keyValue |
|---|---|---|---|
$shevy-defaults | —none | Map | —none |
$shevy-defaults.base-font-size | Base font size of the project; Can be in px, em, or rem | Value | 1em |
$shevy-defaults.base-line-height | Base line-height of the project; Should be a unitless value. | Number | 1.5 |
$shevy-defaults.base-font-scale | Font scale for project, largest to smallest, i.e the base font size multiplied by this number will result in the font-sizes for h1, h2, h3... in order. | Map | (3, 2.5, 2, 1.5, 1.25, 1) |
$shevy-defaults.margin-bottom | Determines if headings and content elements will have a margin-bottom set on them. | Boolean | true |
Used by
- [function]
settings