This site is no longer maintained

This is the documentation for version 0 of the design system and will no longer be updated. Please see the new Design System site on nice.org.uk for the most up-to-date documentation.

Alpha NICE Design System is in development. This means it is not feature complete and there may be issues. Find any? Please, let us know!

Mixins

default-focus-style

default-focus-style

@mixin default-focus-style (...) { ... }

inverse-focus-style

inverse-focus-style

@mixin inverse-focus-style (...) { ... }

h1

h1

@mixin h1 (...) { ... }

h2

h2

@mixin h2 (...) { ... }

h3

h3

@mixin h3 (...) { ... }

h4

h4

@mixin h4 (...) { ... }

h5

h5

@mixin h5 (...) { ... }

h6

h6

@mixin h6 (...) { ... }

font-size

font-size

@mixin font-size (...) { ... }
Parameters
parameter Name parameter Description parameter Type parameter Default value
$scale

{Integer|Name} The integer ratio or named font-size.

$important

{Boolean} Whether to add an important declaration to the CSS rules.

font

font

@mixin font (...) { ... }
Parameters
parameter Name parameter Description parameter Type parameter Default value
$scale

{Integer|Name} The integer ratio or named font-size.

$important

{Boolean} Whether to add an important declaration to the CSS rules.

lead

lead

@mixin lead (...) { ... }

Selectors

Function

font-family

font-family

@function font-family (...) { ... }
Parameters
parameter Name parameter Description parameter Type parameter Default value
$stack

The stack name e.g. sans, serif or mono

String

get-scale-integer

get-scale-integer

@function get-scale-integer (...) { ... }
Parameters
parameter Name parameter Description parameter Type parameter Default value
$scale

{Integer|Name} The integer ratio or named font-size.

get-font-size

get-font-size

@function get-font-size (...) { ... }
Parameters
parameter Name parameter Description parameter Type parameter Default value
$scale

{Integer|Name} The integer ratio or named font-size.

get-line-height

get-line-height

@function get-line-height (...) { ... }
Parameters
parameter Name parameter Description parameter Type parameter Default value
$scale

{Integer|Name} The integer ratio or named font-size.

Placeholders

list

				%list {}
			

Variables

$named-font-sizes

named-font-sizes

$named-font-sizes: (
  h1: 7,
  h2: 6,
  h3: 5,
  h4: 4,
  h5: 3,
  h6: 2,
  lead: 1,
  p: 0
);
Map structure
key Name key Description key Type key Value
h1

Heading 1

Integer 6
h2

Heading 2

Integer 5
h3

Heading 3

Integer 4
h4

Heading 4

Integer 3
h5

Heading 5

Integer 2
h6

Heading 6

Integer 1
p

Paragraph

Integer 0

$font-sizes

font-sizes

$font-sizes: (
  // sass-lint:disable-block space-around-operator
  -2: (
    fs: 12,
    lh: 4 * 4,
    fw: 400,
    mb: $spacing-small,
    mt: $spacing-small
  ),
  -1: (
    fs: 14,
    lh: 4 * 5,
    fw: 400,
    mb: $spacing-medium,
    mt: $spacing-medium
  ),
  // Paragraphs
  0: (
    fs: 4 * 4,
    lh: 4 * 6,
    fw: 400,
    mb: $spacing-medium,
    mt: $spacing-medium
  ),
  // Lead
  1: (
    fs: 4 * 5,
    lh: 4 * 7,
    fw: 400,
    mb: $spacing-medium,
    mt: $spacing-medium
  ),
  // h6
  2: (
    fs: 4 * 4,
    lh: 4 * 5,
    fw: 700,
    mb: $spacing-medium,
    mt: $spacing-medium
  ),
  // h5
  3: (
    fs: 4 * 5,
    lh: 4 * 6,
    fw: 700,
    mb: $spacing-medium,
    mt: $spacing-medium
  ),
  // h4
  4: (
    fs: 4 * 6,
    lh: 4 * 7,
    fw: 700,
    mb: $spacing-medium,
    mt: $spacing-medium
  ),
  // h3
  5: (
    fs: 4 * 7,
    lh: 4 * 8,
    fw: 700,
    mb: $spacing-medium,
    mt: $spacing-large
  ),
  // h2
  6: (
    fs: 4 * 8,
    lh: 4 * 10,
    fw: 700,
    mb: $spacing-medium,
    mt: $spacing-large
  ),
  // h1
  7: (
    fs: 4 * 11,
    lh: 4 * 12,
    fw: 900,
    mb: $spacing-medium,
    mt: 0,
  )
);

Edit on GitHub