Core

variables

hf-generate-base

$hf-generate-base: $hf-generate !default;

Description

Controls whether styles in this file (base) are generated.

Type

Boolean

Author

  • Benjamin Fleming

[private] -hf-default-font-size

$-hf-default-font-size: 16px;

Description

Defines the browser default font size for the web document.

Type

Number

Used by

Author

  • Benjamin Fleming

hf-generate

$hf-generate: true !default;

Description

Controls whether styles in the framework are generated. This is useful if you only intend on using the functions, mixins, placeholders, and variables.

Type

Boolean

Author

  • Benjamin Fleming

hf-prefixes

$hf-prefixes: (
	'module': '',
	'utility': '\\+',
	'parameter': '-',
	'state': 'is-',
	'feature': 'has-',
	'featureless': 'no-'
) !default;

Description

Defines the class prefixes for different types of style definitions.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
module—noneString—none
utility—noneString\+
parameter—noneString-
value—noneString-
state—noneStringis-
feature—noneStringhas-
featureless—noneStringno-

Used by

Author

  • Benjamin Fleming

hf-font-size

$hf-font-size: 16px !default;

Description

Defines the base font size for the web document.

Type

Number

Used by

Author

  • Benjamin Fleming

hf-max-width

$hf-max-width: 1280px !default;

Description

Defines the maximum width for responsive modules to consider. On the contrary this does not determine the maximum width of the site.

Type

Number

Author

  • Benjamin Fleming

hf-sizes

$hf-sizes: (
	'sm': 0.5em,
	'md':   1em,
	'lg':   2em
) !default;

Description

Defines the different sizes to be used.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
sm—noneNumber0.5em
md—noneNumber1em
lg—noneNumber2em

Used by

Author

  • Benjamin Fleming

hf-gutters

$hf-gutters: (
	'sm': 0.5em,
	'md':   1em,
	'lg':   2em
) !default;

Description

Defines the different gutters to be used.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
sm—noneNumber0.5em
md—noneNumber1em
lg—noneNumber2em

Used by

Author

  • Benjamin Fleming

hf-divisions

$hf-divisions: (
	'12': (12 / 12 * 100%),
	'11': (11 / 12 * 100%),
	'10': (10 / 12 * 100%),
	 '9': ( 9 / 12 * 100%),
	 '8': ( 8 / 12 * 100%),
	 '7': ( 7 / 12 * 100%),
	 '6': ( 6 / 12 * 100%),
	 '5': ( 5 / 12 * 100%),
	 '4': ( 4 / 12 * 100%),
	 '3': ( 3 / 12 * 100%),
	 '2': ( 2 / 12 * 100%),
	 '1': ( 1 / 12 * 100%)
) !default;

Description

Defines the different divisions to be used.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
12—noneNumber100%
11—noneNumber91.67%
10—noneNumber83.33%
9—noneNumber75%
8—noneNumber66.67%
7—noneNumber58.33%
6—noneNumber50%
5—noneNumber41.67%
4—noneNumber33.33%
3—noneNumber25%
2—noneNumber16.67%
1—noneNumber8.33%

Used by

Author

  • Benjamin Fleming

hf-breakpoints

$hf-breakpoints: (
	'mobl':    0px,
	'tabl':  640px,
	'desk': 1080px
) !default;

Description

Defines the different breakpoints to be used. Breakpoints are to be taken as anything at or above the labels value.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
mobl—noneNumber0px
tabl—noneNumber640px
desk—noneNumber1080px

Used by

Author

  • Benjamin Fleming

functions

[private] -hf-slice

@function -hf-slice($list, $start: 1, $length: length($list)) { ... }

Description

Slices a list All error checking is removed as being only a helper function for this file appropriate checking is done in context.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList—none
$start—noneNumber1
$length—noneNumberlength($list)

Returns

List

Used by

Links

Author

  • Hugo Giraudel

[private] -hf-test

@function -hf-test($value, $as) { ... }

Description

Tests if the value's type matches This is a recursive helper method for the actual test function below.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneAny—none
$as—noneList—none

Returns

Boolean

Throws

  • {$as-type} is not a string

Requires

Used by

Author

  • Benjamin Fleming

[private] -hf-assert-lines

@function -hf-assert-lines($as, $plural: false) { ... }

Description

Generates all assertion messages for a given test (I find it pretty funny that this error printing function is twice as large as the actual test function)

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$as—noneList—none
$plural—noneBooleanfalse

Returns

List

Requires

Used by

Author

  • Benjamin Fleming

hf-test

@function hf-test($value, $as) { ... }

Description

Tests a value's type against a list of types

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneAny—none
$as—noneList or String—none

Returns

Boolean

Requires

Author

  • Benjamin Fleming

mixins

hf-assert

@mixin hf-assert($value, $as) { ... }

Description

Asserts a value's type against a list of types

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneAny—none
$as—noneList or String—none

Output

An error only if the test fails.

Requires

Author

  • Benjamin Fleming

Core → Components

mixins

hf-button

@mixin hf-button($font-size: 1em, $padding: 0, $border-width: 0, $line-height: 1, $multiline: false) { ... }

Description

A mixin for styling buttons

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$font-size—noneNumber1em
$padding—noneNumber or List0
$border-width—noneNumber or List0
$line-height—noneNumber1
$multiline—noneBooleanfalse

Requires

Author

  • Benjamin Fleming

hf-field

@mixin hf-field($font-size: 1em, $padding: 0, $border-width: 0, $line-height: 1) { ... }

Description

A mixin for styling input, select and textarea elements

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$font-size—noneNumber1em
$padding—noneNumber or List0
$border-width—noneNumber or List0
$line-height—noneNumber1

Requires

Author

  • Benjamin Fleming

hf-icon

@mixin hf-icon($size: $hf-icon-size, $font: $hf-icon-font, $sprite: $hf-icon-sprite) { ... }

Description

Turns an element into an icon module

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$size—noneNumber$hf-icon-size
$font—noneString or Boolean$hf-icon-font
$sprite—noneString or Boolean$hf-icon-sprite

Requires

Author

  • Benjamin Fleming

hf-icon-type

@mixin hf-icon-type($value) { ... }

Description

Adds a specific icon type to an icon module

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneList or String or Number—none

Throws

  • Pseudo selector #{$pseudo} is neither

Author

  • Benjamin Fleming

variables

hf-generate-icon

$hf-generate-icon: $hf-generate !default;

Description

Controls whether styles in this file (icon) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-icon-selector

$hf-icon-selector: hf-module('icon') !default;

Description

The icon module selector

Type

String

Author

  • Benjamin Fleming

hf-icon-font

$hf-icon-font: false !default;

Description

The name of the icon font, if applicable

Type

String or Boolean

Used by

Author

  • Benjamin Fleming

hf-icon-sprite

$hf-icon-sprite: false !default;

Description

The path to the icon sprite sheet, if applicable

Type

String or Boolean

Used by

Author

  • Benjamin Fleming

hf-icon-size

$hf-icon-size: $hf-font-size !default;

Description

The default size of the icon

Type

Number

Used by

Author

  • Benjamin Fleming

hf-icons

$hf-icons: false !default;

Description

Map of icons name and value. If the value is a string of length one, that is treated as a font character. If the value is a string of more than length one, that is treated as a image file. If the value is a number or list of numbers, that is treated as a sprite image position.

Type

Map

Author

  • Benjamin Fleming

Core → Functions

functions

hf-name

@function hf-name($type, $name, $as-selector: true) { ... }

Description

Creates a usable class name from a prefix and a name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

The prefix type. The value is retrieved from the $hf-prefixes map.

String—none
$name

The name of the class to be prefixed.

String—none
$as-selector

Whether to return it as a usable selector, or just the name.

Booleantrue

Returns

String —

The prefixed class name

Requires

Used by

Author

  • Benjamin Fleming

hf-selector

@function hf-selector($type, $names) { ... }

Description

Creates a hydro selector using the set prefixes and a multidimensional list of names.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

If a string, the prefix is retrieved from the $hf-prefixes map. If a list (of size 2), the first value is treated as a selector string, and the second prefix type. This allows prefixing entire selectors.

String or List—none
$names

Each name passed is prefixed and separated by a comma. If a name is also a list each item of that is prefixed and joined together.

String or List—none

Returns

String —

Selector

Requires

Used by

Author

  • Benjamin Fleming

hf-module

@function hf-module($name) { ... }

Description

Creates a module class name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the module.

String—none

Returns

String —

The module class name

Requires

Author

  • Benjamin Fleming

hf-utility

@function hf-utility($name) { ... }

Description

Creates a utility class name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the utility.

String—none

Returns

String —

The utility class name

Requires

Author

  • Benjamin Fleming

hf-parameter

@function hf-parameter($name) { ... }

Description

Creates a parameter class name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the parameter.

String—none

Returns

String —

The parameter class name

Requires

Author

  • Benjamin Fleming

hf-state

@function hf-state($name) { ... }

Description

Creates a state class name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the state.

String—none

Returns

String —

The state class name

Requires

Author

  • Benjamin Fleming

hf-feature

@function hf-feature($name) { ... }

Description

Creates a feature class name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the feature.

String—none

Returns

String —

The feature class name

Requires

Author

  • Benjamin Fleming

hf-featureless

@function hf-featureless($name) { ... }

Description

Creates a featureless class name.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the feature.

String—none

Returns

String —

The featureless class name

Requires

Author

  • Benjamin Fleming

hf-size

@function hf-size($type) { ... }

Description

Gets a sizes value. Just a readable wrapper for map-get() on $hf-sizes.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

The size type

String—none

Returns

Number

Requires

Author

  • Benjamin Fleming

hf-breakpoint

@function hf-breakpoint($type) { ... }

Description

Gets a breakpoints value. Just a readable wrapper for map-get() on $hf-breakpoints.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

The breakpoint type

String—none

Returns

Number

Requires

Author

  • Benjamin Fleming

hf-gutter

@function hf-gutter($type) { ... }

Description

Gets a gutters value. Just a readable wrapper for map-get() on $hf-gutters.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

The gutter type

String—none

Returns

Number

Requires

Author

  • Benjamin Fleming

hf-division

@function hf-division($type) { ... }

Description

Gets a divisions value. Just a readable wrapper for map-get() on $hf-divisions.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

The division type

String—none

Returns

Number

Requires

Author

  • Benjamin Fleming

hf-shorthand

@function hf-shorthand($list, $key) { ... }

Description

Returns the value from a shorthand CSS list associated with the key.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList or Map—none
$key

Valid keys: top, topleft, right, topright, bottom, bottomright, left, bottomleft

String—none

Returns

Any type

Throws

  • Cannot return #{inspect($key)} item from an empty list

  • {inspect($key)} is neither top/topleft, right/topright, bottom/bottomright or left/bottomleft

Used by

Author

  • Benjamin Fleming

hf-flatten

@function hf-flatten($list, $separator: auto) { ... }

Description

Flatten a multi-dimensional list into a single dimension list.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneAny—none
$separator—noneStringauto

Returns

List

Throws

  • {inspect($separator)} is not a valid separator

Used by

Author

  • Benjamin Fleming

hf-sort

@function hf-sort($list, $direction: asc, $separator: auto, $keys: false) { ... }

Description

Insertion sort for sorting comparison-based values.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList or Map—none
$direction—noneStringasc
$separator—noneStringauto
$keys

When sorting a map, whether to sort by it's keys (or it's values)

Booleanfalse

Returns

List or Map

Throws

  • {inspect($list)} is not a list

  • {inspect($direction)} is not a valid direction

  • {inspect($x)} and #{inspect($y)} are incomparable values

Used by

Author

  • Benjamin Fleming

top

@function top($list) { ... }

Description

Returns the "top" value of a list. Useful to extract individual side values from CSS short-hand lists like paddings.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList or Map—none

Returns

Any type

Requires

Author

  • Benjamin Fleming

right

@function right($list) { ... }

Description

Returns the "right" value of a list. Useful to extract individual side values from CSS short-hand lists like paddings.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList or Map—none

Returns

Any type

Requires

Author

  • Benjamin Fleming

bottom

@function bottom($list) { ... }

Description

Returns the "bottom" value of a list. Useful to extract individual side values from CSS short-hand lists like paddings.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList or Map—none

Returns

Any type

Requires

Author

  • Benjamin Fleming

left

@function left($list) { ... }

Description

Returns the "left" value of a list. Useful to extract individual side values from CSS short-hand lists like paddings.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list—noneList or Map—none

Returns

Any type

Requires

Author

  • Benjamin Fleming

[private] -hf-absolute-unit

@function -hf-absolute-unit($value) { ... }

Description

Checks if a unit is absolute.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number or unit (as a string) to check.

Number or String—none

Returns

Boolean

Requires

Used by

Author

  • Benjamin Fleming

[private] -hf-relative-unit

@function -hf-relative-unit($value) { ... }

Description

Checks if a unit is relative.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number or unit (as a string) to check.

Number or String—none

Returns

Boolean

Requires

Used by

Author

  • Benjamin Fleming

[private] -hf-unit-normalize

@function -hf-unit-normalize($value) { ... }

Description

Converts a number into a normalized value. Used for conversion.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number to normalize

Number—none

Returns

Number —

The normalized number

Example

-hf-unit-normalize(1.5pt) // Outputs 2

Requires

Used by

Author

  • Benjamin Fleming

hf-unit-type

@function hf-unit-type($value) { ... }

Description

Gets the unit type

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number or unit (as a string) to check.

Number or String—none

Returns

String —

absolute, relative or other

Requires

Author

  • Benjamin Fleming

hf-precision

@function hf-precision($value, $decimals: $hf-number-precision, $type: round) { ... }

Description

Round a number to specified number of decimal places

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number to round

Number—none
$decimals

The number of decimals to round to

Number$hf-number-precision
$type

[round | ceil | floor] The rounding type

Stringround

Returns

Number —

The rounded number

Throws

  • {$value} is not a number.

  • {$decimals} is not a non-negative number.

  • {$type} is not a valid type

Requires

Used by

Author

  • Benjamin Fleming

hf-convert

@function hf-convert($value, $unit, $factor: null) { ... }

Description

Convert a number to another unit. TODO Only convert REM units to the base font size factor

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number (or list or map of numbers) to convert

Number or List or Map—none
$unit

The unit to convert the number to

String—none
$factor

The number to convert against (when converting between absolute and relative values) This is defaulted to the global font size set in the settings file.

Numbernull

Returns

Number or List or Map —

The converted number (or list or map of numbers)

Example

hf-convert(0.5em, '%') // Outputs 50%
hf-convert(32px, em, 16px) // Outputs 2em

Throws

  • {inspect($value)} is not a valid type

  • {inspect($unit)} is not a valid unit

  • {inspect($value)} does not have a valid unit

Requires

Used by

Author

  • Benjamin Fleming

hf-sum

@function hf-sum($format, $values) { ... }

Description

Sum a list of values, either converting them all to a single unit or outputting them as a CSS3 calc() value.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$format—noneNumber or String or Map—none
$values—noneNumber—none

Returns

Number or String

Example

hf-sum(2px, 5px, -1px) // Outputs 6px
hf-sum(10px, -2em, 50%) // Outputs calc(10px - 2em + 50%)
hf-sum('em', 8px, 1em, 50%) // Outputs 2em (given that $hf-font-size is 16px)
hf-sum(('%': 8px), 16px, 24px, 1.5em) // Outputs 650%

Throws

  • No numbers were passed

  • {inspect($format)} is an invalid format

  • {inspect($item)} is not a number

Requires

Used by

Author

  • Benjamin Fleming

px

@function px($value, $factor: null) { ... }

Description

Converts a number (or list of numbers) to pixels.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number (or list or map of numbers) to convert

Number or List or Map—none
$factor

The number to convert against (when converting between absolute and relative values) This is defaulted to the global font size set in the settings file.

Numbernull

Returns

Number or List or Map —

The converted number (or list or map of numbers) in pixels

Requires

Author

  • Benjamin Fleming

em

@function em($value, $factor: null) { ... }

Description

Converts a number (or list of numbers) to EM's.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number (or list or map of numbers) to convert

Number or List or Map—none
$factor

The number to convert against (when converting between absolute and relative values) This is defaulted to the global font size set in the settings file.

Numbernull

Returns

Number or List or Map —

The converted number (or list or map of numbers) in EM's

Requires

Author

  • Benjamin Fleming

rem

@function rem($value, $factor: null) { ... }

Description

Converts a number (or list of numbers) to relative EM's.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number (or list or map of numbers) to convert

Number or List or Map—none
$factor

The number to convert against (when converting between absolute and relative values) This is defaulted to the global font size set in the settings file.

Numbernull

Returns

Number or List or Map —

The converted number (or list or map of numbers) in relative EM's

Requires

Author

  • Benjamin Fleming

percent

@function percent($value, $factor: null) { ... }

Description

Converts a number (or list of numbers) to a percentage.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number (or list or map of numbers) to convert

Number or List or Map—none
$factor

The number to convert against (when converting between absolute and relative values) This is defaulted to the global font size set in the settings file.

Numbernull

Returns

Number or List or Map —

The converted number (or list or map of numbers) as a percentage

Requires

Author

  • Benjamin Fleming

decimal

@function decimal($value, $factor: null) { ... }

Description

Converts a number (or list of numbers) to a decimal.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

The number (or list or map of numbers) to convert

Number or List or Map—none
$factor

The number to convert against (when converting between absolute and relative values) This is defaulted to the global font size set in the settings file.

Numbernull

Returns

Number or List or Map —

The converted number (or list or map of numbers) as a decimal

Requires

Author

  • Benjamin Fleming

hf-str-replace

@function hf-str-replace($string, $search, $replace) { ... }

Description

Replaces all occurrences of a substring with another in a string

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$string

Initial string

String—none
$search

Substring to replace

String—none
$replace

('') - New value

String—none

Returns

String —

Updated string

Links

Author

  • Hugo Giraudel

variables

hf-number-precision

$hf-number-precision: 5 !default;

Description

The number of decimals to round/ceil/floor to

Type

Number

Used by

Author

  • Benjamin Fleming

hf-number-absolute-units

$hf-number-absolute-units: (
	'px': 1px,
	'in': (1in / 96),
	'cm': (2.54cm / 96),
	'mm': (25.4mm / 96),
	'pt': (72pt / 96),
	'pc': (6pc / 96)
) !default;

Description

A map of absolute units and their relative values. Used when converting. Their ratios are related to a normalised absolute value (see -hf-unit-normalize). As an example, "1" (as a normalized absolute unit) is equivalent to "1px". To put it simply, each value in the map should be the equivalent to every other (1px = 0.75pt = 0.0625pc = ...)

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
px—noneNumber1px
in—noneNumber0.0104in
cm—noneNumber0.0265cm
mm—noneNumber0.2646mm
pt—noneNumber0.75pt
pc—noneNumber0.0625pc

Used by

Author

  • Benjamin Fleming

hf-number-relative-units

$hf-number-relative-units: (
	'': 1,
	'%': 100%,
	'em': 1em,
	'rem': 1rem,
	'vw': 100vw,
	'vh': 100vh,
	'vmin': 100vmin,
	'vmax': 100vmax,
	'deg': 360deg,
	'rad': 6.2832rad,
	'grad': 400grad,
	'turn': 1turn
) !default;

Description

A map of relative units and their relative values. Used when converting. Their ratios are related to a normalised relative value (see -hf-unit-normalize). As an example, "1" (as a normalized relative unit) is equivalent to "1em". To put it simply, each value in the map should be the equivalent to every other (1em = 100% = 360deg = ...)

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
[1]—noneNumber—none
%—noneNumber100%
em—noneNumber1em
rem—noneNumber1rem
vw—noneNumber100vw
vh—noneNumber100vh
vmin—noneNumber100vmin
vmax—noneNumber100vmax
deg—noneNumber360deg
rad—noneNumber6.2832rad
grad—noneNumber400grad
turn—noneNumber1turn

Used by

Author

  • Benjamin Fleming

Core → Libraries

variables

hf-generate-normalize

$hf-generate-normalize: $hf-generate !default;

Description

Controls whether styles in this file (normalize) are generated.

Type

Boolean

Links

Authors

  • Nicolas Gallagher

  • Jonathan Neal

Core → Structures

variables

hf-generate-alignbox

$hf-generate-alignbox: $hf-generate !default;

Description

Controls whether styles in this file (alignbox) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-alignbox-selector

$hf-alignbox-selector: hf-module('alignbox') !default;

Description

The alignbox module selector

Type

String

Author

  • Benjamin Fleming

hf-alignbox-box-selector

$hf-alignbox-box-selector: hf-module('box') !default;

Description

The alignbox box module selector

Type

String

Author

  • Benjamin Fleming

hf-generate-bar

$hf-generate-bar: $hf-generate !default;

Description

Controls whether styles in this file (bar) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-bar-selector

$hf-bar-selector: hf-module('bar') !default;

Description

The bar module selector

Type

String

Author

  • Benjamin Fleming

hf-bar-item-selector

$hf-bar-item-selector: hf-module('item') !default;

Description

The bar item module selector

Type

String

Author

  • Benjamin Fleming

hf-generate-columns

$hf-generate-columns: $hf-generate !default;

Description

Controls whether styles in this file (columns) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-columns-selector

$hf-columns-selector: hf-module('columns') !default;

Description

The columns module selector

Type

String

Author

  • Benjamin Fleming

hf-column-selector

$hf-column-selector: hf-module('column') !default;

Description

The column module selector

Type

String

Author

  • Benjamin Fleming

hf-generate-container

$hf-generate-container: $hf-generate !default;

Description

Controls whether styles in this file (container) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-container-selector

$hf-container-selector: hf-module('container') !default;

Description

The container module selector

Type

String

Author

  • Benjamin Fleming

hf-generate-grid

$hf-generate-grid: $hf-generate !default;

Description

Controls whether styles in this file (grid) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-grids

$hf-grids: 8 !default;

Description

Number of grid options for cells in a row at maximum width

Type

Number

Author

  • Benjamin Fleming

hf-grid-cell-contract

$hf-grid-cell-contract: 0% !default;

Description

How much can the cells contract before wrapping

Type

Number

Author

  • Benjamin Fleming

hf-grid-selector

$hf-grid-selector: hf-module('grid') !default;

Description

The grid module selector

Type

String

Author

  • Benjamin Fleming

hf-grid-cell-selector

$hf-grid-cell-selector: hf-module('cell') !default;

Description

The grid cell module selector

Type

String

Author

  • Benjamin Fleming

hf-generate-ratiobox

$hf-generate-ratiobox: $hf-generate !default;

Description

Controls whether styles in this file (ratiobox) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-ratiobox-selector

$hf-ratiobox-selector: hf-module('ratiobox') !default;

Description

The ratiobox module selector

Type

String

Author

  • Benjamin Fleming

hf-ratiobox-box-selector

$hf-ratiobox-box-selector: hf-module('box') !default;

Description

The ratiobox box module selector

Type

String

Author

  • Benjamin Fleming

hf-ratiobox-ratios

$hf-ratiobox-ratios: (1, 1) (5, 4) (4, 3) (3, 2) (16, 10) (5, 3) (16, 9) (1.85, 1) (2, 1) (2.39, 1) !default;

Description

A list of ratios

Type

List

Author

  • Benjamin Fleming

hf-ratiobox-invert

$hf-ratiobox-invert: false !default;

Description

Whether or not the inversions of each ratio should be made a parameter

Type

Boolean

Author

  • Benjamin Fleming

hf-structure-h-gap-property

$hf-structure-h-gap-property: border !default;

Description

Whether the horizontal gap is applied using borders (border) or paddings (padding).

Type

String

Author

  • Benjamin Fleming

hf-structure-child-selector

$hf-structure-child-selector: '*' !default;

Description

The selector for the structure child element.

Type

String

Author

  • Benjamin Fleming

mixins

hf-alignbox

@mixin hf-alignbox($h-align: center, $v-align: center) { ... }

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$h-align—noneStringcenter
$v-align—noneStringcenter

Throws

  • {inspect($h-align)} is not a valid horizontal alignment

  • {inspect($h-align)} is not a valid vertical alignment

Requires

Author

  • Benjamin Fleming

hf-alignbox-box

@mixin hf-alignbox-box($fix: none) { ... }

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$fix—noneStringnone

Author

  • Benjamin Fleming

hf-ratiobox

@mixin hf-ratiobox($x: 1, $y: 1) { ... }

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$x—noneNumber1
$y—noneNumber1

Throws

  • {inspect($n)} is not a positive decimal greater than zero

Author

  • Benjamin Fleming

hf-ratiobox-box

@mixin hf-ratiobox-box() { ... }

Parameters

None.

Author

  • Benjamin Fleming

hf-structure

@mixin hf-structure($h-align: left, $v-align: left, $h-gap: 0, $v-gap: 0, $h-outer-gap: false, $v-outer-gap: false, $reversed: false, $h-gap-property: $hf-structure-h-gap-property, $child-selector: $hf-structure-child-selector) { ... }

Description

Turns an element into a structural module.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$h-align

Either left, right, center or justify

Stringleft
$v-align

Either top, bottom, center or fill

Stringleft
$h-gap

The horizontal spacing between children

Number0
$v-gap

The vertical spacing between children

Number0
$h-outer-gap

Whether to add an outside horizontal gap to the children. Uses the value set in $h-gap.

Booleanfalse
$v-outer-gap

Whether to add an outside vertical gap to the children. Uses the value set in $v-gap.

Booleanfalse
$reversed

Whether to reverse the order of the children.

Booleanfalse
$h-gap-property

Whether the horizontal gap is applied using borders (border) or paddings (padding).

String$hf-structure-h-gap-property
$child-selector

The selector for the structure child element.

String$hf-structure-child-selector

Output

Styles for a structural module. Will output up to two more selectors - one for the child elements, and one for the after pseudo element if the horizontal gap is set to justify.

Requires

Author

  • Benjamin Fleming

Core → Utilities

variables

hf-generate-clearfix

$hf-generate-clearfix: $hf-generate !default;

Description

Controls whether styles in this file (clearfix) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-generate-gutters

$hf-generate-gutters: $hf-generate !default;

Description

Controls whether styles in this file (gutters) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-generate-size

$hf-generate-size: $hf-generate !default;

Description

Controls whether styles in this file (size) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-generate-text

$hf-generate-text: $hf-generate !default;

Description

Controls whether styles in this file (text) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-generate-visibility

$hf-generate-visibility: $hf-generate !default;

Description

Controls whether styles in this file (visibility) are generated.

Type

Boolean

Author

  • Benjamin Fleming

mixins

hf-clearfix

@mixin hf-clearfix() { ... }

Description

The clearfix mixin.

Parameters

None.

Output

Styles on the :before and :after pseudo selectors that handle float clearing.

Author

  • Benjamin Fleming

hf-display-flex

@mixin hf-display-flex() { ... }

Description

Set display to flex

Parameters

None.

Output

Multiple display properties with vendor prefixed values

Used by

Author

  • Benjamin Fleming

hf-display-inline-flex

@mixin hf-display-inline-flex() { ... }

Description

Set display to inline flex

Parameters

None.

Output

Multiple display properties with vendor prefixed values

Author

  • Benjamin Fleming

hf-flex-direction

@mixin hf-flex-direction($direction: row) { ... }

Description

Set the flex direction

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$direction—noneStringrow

Output

Multiple vendor prefixed flex direction properties

Author

  • Benjamin Fleming

hf-flex-wrap

@mixin hf-flex-wrap($wrap: nowrap) { ... }

Description

Set the flex wrap

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$wrap—noneStringnowrap

Output

Multiple vendor prefixed flex wrap properties

Author

  • Benjamin Fleming

hf-flex-flow

@mixin hf-flex-flow($flow: row nowrap) { ... }

Description

Set the flex flow

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$flow—noneString or Listrow nowrap

Output

Multiple vendor prefixed flex flow properties

Used by

Author

  • Benjamin Fleming

hf-order

@mixin hf-order($order: 0) { ... }

Description

Set the flex order

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$order—noneNumber0

Output

Multiple vendor prefixed flex order properties

Author

  • Benjamin Fleming

hf-flex-grow

@mixin hf-flex-grow($grow: 0) { ... }

Description

Set the flex grow

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$grow—noneNumber0

Output

Multiple vendor prefixed flex grow properties

Author

  • Benjamin Fleming

hf-flex-shrink

@mixin hf-flex-shrink($shrink: 1) { ... }

Description

Set the flex shrink

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$shrink—noneNumber1

Output

Multiple vendor prefixed flex shrink properties

Author

  • Benjamin Fleming

hf-flex-basis

@mixin hf-flex-basis($basis: auto) { ... }

Description

Set the flex basis

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$basis—noneStringauto

Output

Multiple vendor prefixed flex basis properties

Author

  • Benjamin Fleming

hf-flex

@mixin hf-flex($grow: 0, $shrink: null, $basis: null) { ... }

Description

Set the shorthand flex property

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$grow—noneNumber0
$shrink—noneNumbernull
$basis—noneStringnull

Output

Multiple vendor prefixed flex properties

Author

  • Benjamin Fleming

hf-justify-content

@mixin hf-justify-content($justify: flex-start) { ... }

Description

Set content justification

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$justify—noneStringflex-start

Output

Multiple vendor prefixed justify content properties

Used by

Author

  • Benjamin Fleming

hf-align-items

@mixin hf-align-items($align: stretch) { ... }

Description

Set item alignment

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$align—noneStringstretch

Output

Multiple vendor prefixed align items properties

Used by

Author

  • Benjamin Fleming

hf-align-self

@mixin hf-align-self($align: auto) { ... }

Description

Set self alignment

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$align—noneStringauto

Output

Multiple vendor prefixed align self properties

Author

  • Benjamin Fleming

hf-align-content

@mixin hf-align-content($align: stretch) { ... }

Description

Set content alignment

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$align—noneStringstretch

Output

Multiple vendor prefixed align content properties

Author

  • Benjamin Fleming

hf-media

@mixin hf-media($device: all, $from: null, $until: null, $property: width) { ... }

Description

Simple media query abstraction for expressive and maintainable media queries.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$device—noneStringall
$from—noneNumber or List or Stringnull
$until—noneNumber or List or Stringnull
$property—noneStringwidth

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles to go inside the media query

Output

Media query following the parameters passed

Throws

  • {inspect($value)} is not a valid value

  • {inspect($value)} is not a valid ratio list

  • {inspect($dim)} is not a valid ratio list value

  • {inspect($value)} is not a

Requires

Used by

Author

  • Benjamin Fleming

hf-from

@mixin hf-from($value, $property: width) { ... }

Description

Media query from a minimum value

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneNumber or List or String—none
$property—noneStringwidth

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles to go inside the media query

Output

Media query following the parameters passed

Requires

Author

  • Benjamin Fleming

hf-until

@mixin hf-until($value, $property: width) { ... }

Description

Media query to a maximum value

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneNumber or List or String—none
$property—noneStringwidth

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles to go inside the media query

Output

Media query following the parameters passed

Requires

Author

  • Benjamin Fleming

hf-breakpoint

@mixin hf-breakpoint($value, $direction: from, $property: width) { ... }

Description

Media query only at a certain breakpoint label

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value—noneString—none
$direction—noneStringfrom
$property—noneStringwidth

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles to go inside the media query

Output

Media query following the parameters passed

Throws

  • {inspect($breakpoint)} is not a valid breakpoint name

  • {inspect($direction)} is not a valid direction

Requires

Author

  • Benjamin Fleming

hf-responsive

@mixin hf-responsive($map, $property: width, $direction: from) { ... }

Description

Shorthand media queries to be used within selectors

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$map—noneMap—none
$property—noneStringwidth
$direction—noneStringfrom

Output

Set of media queries containing the properties passed

Example

@include hf-responsive((
    400px: (font-size: 1em, color: black),
    tab: (font-size: 2em, color: red),
    dsk: (font-size: 3em)
));

Throws

  • {inspect($break)} is not a valid breakpoint name

  • {inspect($break)} is not a number or valid breakpoint name

  • {inspect($direction)} is not a valid direction

Requires

Author

  • Benjamin Fleming

hf-selector

@mixin hf-selector($type, $names) { ... }

Description

A mixin wrapper for the hf-selector function.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

If a string, the prefix is retrieved from the $hf-prefixes map. If a list (of size 2), the first value is treated as a selector string, and the second prefix type. This allows prefixing entire selectors.

String or List—none
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the selector

Output

The selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-module

@mixin hf-module($names) { ... }

Description

An alias for passing 'module' as the type to the hf-selector mixin.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the module selector

Output

The module selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-utility

@mixin hf-utility($names) { ... }

Description

An alias for passing 'utility' as the type to the hf-selector mixin.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the utility selector

Output

The utility selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-parameter

@mixin hf-parameter($names) { ... }

Description

An alias for passing 'parameter' as the type to the hf-selector mixin.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the parameter selector

Output

The parameter selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-state

@mixin hf-state($names) { ... }

Description

An alias for passing 'state' as the type to the hf-selector mixin.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the state selector

Output

The state selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-feature

@mixin hf-feature($names) { ... }

Description

An alias for passing 'feature' as the type to the hf-selector mixin.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the feature selector

Output

The feature selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-featureless

@mixin hf-featureless($names) { ... }

Description

An alias for passing 'featureless' as the type to the hf-selector mixin.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$names

Each name passed is prefixed and separated by a comma. If a name is also a list, each item of that is prefixed and joined together.

List—none

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the featureless selector

Output

The featureless selector and the passed styles

Requires

Author

  • Benjamin Fleming

hf-prefix

@mixin hf-prefix($attribute, $prefix, $multivalue: true, $selector: null) { ... }

Description

Shorthand for selecting a prefix value of an attribute. Typically used to select class prefixes. It is important to note that the prefix itself will be targeted.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$attribute

The attribute to select the prefix on. If a list is provided, the first item in the list is treated as the selector prefix, while the second is then assigned as the attribute.

String or List—none
$prefix

The prefix to select.

String—none
$multivalue

If the attribute can contain multiple space-separated values, such as the class attribute. As an example, this setting can be disabled when selecting on the ID attribute, as that can only contain one value.

Booleantrue
$selector

The prefix to the selector. This is so you can change how it's targeted, such as a child (>), sibling (+) or anything else. This setting overrides the attribute parameter, if that parameter is passed as a list.

Stringnull

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the prefix selector

Output

The prefix selector and the passed styles

Author

  • Benjamin Fleming

hf-suffix

@mixin hf-suffix($attribute, $suffix, $multivalue: true, $selector: null) { ... }

Description

Shorthand for selecting a suffix value of an attribute. Typically used to select class suffixes. It is important to note that the suffix itself will be targeted.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$attribute

The attribute to select the suffix on. If a list is provided, the first item in the list is treated as the selector prefix, while the second is then assigned as the attribute.

String or List—none
$suffix

The suffix to select.

String—none
$multivalue

If the attribute can contain multiple space-separated values, such as the class attribute. As an example, this setting can be disabled when selecting on the ID attribute, as that can only contain one value.

Booleantrue
$selector

The prefix to the selector. This is so you can change how it's targeted, such as a child (>), sibling (+) or anything else. This setting overrides the attribute parameter, if that parameter is passed as a list.

Stringnull

Content

This mixin allows extra content to be passed (through the @content directive). Role: Styles for the suffix selector

Output

The suffix selector and the passed styles

Author

  • Benjamin Fleming

hf-textbox

@mixin hf-textbox($font-size: 1em, $padding: 0, $border-width: 0, $line-height: 1, $multiline: false) { ... }

Description

Turns an element into a textbox

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$font-size—noneNumber1em
$padding—noneNumber or List0
$border-width—noneNumber or List0
$line-height—noneNumber1
$multiline—noneBooleanfalse

Requires

Used by

Author

  • Benjamin Fleming

Theme

variables

hf-generate-base-theme

$hf-generate-base-theme: $hf-generate-base !default;

Description

Controls whether styles in this file (base) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-colors

$hf-colors: (
	'white':         #fff,
	'black':         #000,

	'darker':        #111,
	'dark':          #333,
	'mid':           #777,
	'light':         #ccc,
	'lighter':       #eee,

	'primary-light': #c5cae9,
	'primary':       #3f51b5,
	'primary-dark':  #303f9f,

	'accent-light':  #ff80ab,
	'accent':        #ff4081,
	'accent-dark':   #f50057,

	'success':       #8bc34a,
	'info':          #2196f3,
	'warning':       #ff9800,
	'danger':        #f44336
) !default;

Description

The colors to use in your template.

Type

Map

Used by

Author

  • Benjamin Fleming

hf-fonts

$hf-fonts: (
	'primary': ('Helvetica', sans-serif)
) !default;

Description

The fonts to use in your template

Type

Map

Author

  • Benjamin Fleming

hf-font-weights

$hf-font-weights: (
	'primary': (
		'hairline': 100,
		'light':    300,
		'regular':  400,
		'semibold': 600,
		'bold':     700,
		'black':    900
	)
) !default;

Description

The weights for each font defined in $hf-fonts

Type

Map

Author

  • Benjamin Fleming

Theme → Functions

functions

hf-color

@function hf-color($name, $alpha) { ... }

Description

Retrieves the color from the color map setting.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

The name of the color

String or Color—none
$alpha

The transparency of the color as a decimal

Number—none

Returns

Color —

A CSS color

Throws

  • {inspect($name)} is not a valid color input

Requires

Author

  • Benjamin Fleming

Theme → Modules

variables

hf-generate-text-columns

$hf-generate-text-columns: $hf-generate !default;

Description

Controls whether styles in this file (text-columns) are generated.

Type

Boolean

Author

  • Benjamin Fleming

hf-text-columns-selector

$hf-text-columns-selector: hf-module('text-columns') !default;

Description

The text columns module selector

Type

String

Author

  • Benjamin Fleming

hf-text-columns

$hf-text-columns: 6 !default;

Description

The highest number of columns allowed

Type

Number

Author

  • Benjamin Fleming

Theme → Utilities

mixins

triangle

@mixin triangle($direction, $color, $size, $point-size: $size) { ... }

Description

Converts an element into a triangle using border hacks

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$direction

Either top/up, topright/upright, right, bottomright/downright, bottom/down, bottomleft/downleft, left or topleft/upleft

String—none
$color

The color of the arrow

Color—none
$size—noneNumber—none
$point-size—noneNumber$size

Output

Border styles

Author

  • Benjamin Fleming

triangle-color

@mixin triangle-color($direction, $color) { ... }

Description

Sets the color of a triangle

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$direction

Either top/up, topright/upright, right, bottomright/downright, bottom/down, bottomleft/downleft, left or topleft/upleft

String—none
$color

The color of the arrow

Color—none

Author

  • Benjamin Fleming

variables

hf-generate-style

$hf-generate-style: $hf-generate !default;

Description

Controls whether styles in this file (style) are generated.

Type

Boolean

Author

  • Benjamin Fleming