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

parameterNameparameterDescriptionparameterTypeparameterDefault value
$position

Position of scale value to retrieve

Numbernone
$map

Map from which to retrieve font scale value

Map$shevy

Returns

Number

Font scale value at given position

Requires

Used by

base-font-size

@function base-font-size($map: $shevy) { ... }

Description

Returns the base font size of current settings

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Returns

Value

Value of base-font-size setting

Requires

Used by

base-font-unit

@function base-font-unit($map: $shevy) { ... }

Description

Returns the base font unit of the current settings

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Returns

String

Unit value of base font size

Requires

Used by

base-line-height

@function base-line-height($map: $shevy) { ... }

Description

Returns the base line-height of the current settings

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Returns

Number

Current base-line-height setting

Requires

Used by

line-height-spacing

@function line-height-spacing($factor: 1, $map: $shevy) { ... }

Description

Returns the line-height spacing, which is unaffected by proximity-factor

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$factor

A factor with which to multiply the base-spacing value

Number1
$map

Map of settings

Map$shevy

Returns

Value

Value of the calculated line-height

Requires

Used by

[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

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Returns

Value

Value of base-font-size multiplied by base-line-height

Requires

Used by

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

parameterNameparameterDescriptionparameterTypeparameterDefault value
$factor

A factor with which to multiply the base-spacing value

Number1
$map

Map of settings

Map$shevy

Returns

Value

Value of base-spacing multiplied by the factor provided

Requires

Used by

[private] base-spacing-math

@function base-spacing-math($map: $shevy) { ... }

Description

Calculates base spacing

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault 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

Used by

[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

parameterNameparameterDescriptionparameterTypeparameterDefault value
$unit

String of unit type. Options are: 'px', 'em', or 'rem'

Stringnone

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

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Returns

Map

Map of merged settings

Requires

Used by

mixins

headings

@mixin headings($map: $shevy) { ... }

Description

Output the headings (h1, h2...) with the calculated settings

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$mapnoneMap$shevy

Output

Headings with calculated settings

Requires

body

@mixin body($map: $shevy) { ... }

Description

Output font-size and line-height for body element

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Output

Font-size and line-height for body element

Requires

content

@mixin content($map: $shevy) { ... }

Description

Output font-size, line-height and margin-bottom for p, ol, ul, and pre elements

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

Map of settings

Map$shevy

Output

Font-size, line-height and margin-bottom for p, ol, ul, and pre elements

Requires

with-settings

@mixin with-settings($map) { ... }

Description

Temporarily use a different settings map

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map

A map consisting of some or all $shevy settings.

Mapnone

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

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

keyNamekeyDescriptionkeyTypekeyValue
$shevy-defaultsnoneMapnone
$shevy-defaults.base-font-size

Base font size of the project; Can be in px, em, or rem

Value1em
$shevy-defaults.base-line-height

Base line-height of the project; Should be a unitless value.

Number1.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.

Booleantrue

Used by