This project is a design system starter kit, it is not a framework like Bootstrap. It has no opinions on how your site looks (apart from including normalize.css, which can be exluded)
It is a collection of mixins and tokens to help you develop lightweight and consistent components using a system, rather than writing bespoke CSS per component.
To build the stylesheet and the SASS Documentation, simply run:
npm run build
The documentation will then be available in a folder called ./sassdoc
.
When working on the design system, run the following command to update the stylesheet. This will also watch for any changes to the SASS files.
npm run dev
The below is just a brief overview of what's included, to get more extensive documentation, generate the Sassdoc documentation.
visually-hidden
mixin to hide elements but still make them available to screenreaders, useful for skip links, transcripts, etc.focus
andfocus-inline
mixins to add a focus border around elements.
$focus-offset-default
length$focus-radius
length
transition
mixin to add a basic transition to any propertytransition-opacity
a shortcut mixin to transition the opacity of an element onlytransition-transform
a shortcut mixin to transition the transform of an element only, useful for scaling/sliding elements.
$animation-duration
map$animation-easing-base
string$animation-easing
map
border
mixin to add a simple borderborder-outside
mixin to add a border that won't break the gridborder-radius
mixin to add a border radiusborder-triangle
mixin to add a triangle to any element, useful for tooltips/speech bubbles.
$border-radius
$border-radius--small
media-breakpoint-up
mixin to target a particular media breakpoint and upmedia-breakpoint-down
mixin to target a particular media breakpoint and lowermedia-breakpoint-only
mixin to target a particular media breakpoint onlymedia-breakpoint-between
mixin to target between two breakpointsmedia-pixelratio-up
mixin to target devices with different pixel ratios (e.g. high-res devices vs standard)
$pixelratios
map$breakpoints
map
colour
function that looks up a colour value by name and variation e.g.background: colour('blue', 'lighter')
$colours
map
spacing
function that returns a length by variant e.g.padding: spacing(xxl)
fibonacci
function that returns the fibonacci value for a given number e.g.fibonacci(7)
will return13
.
$spacing-base-unit
length$spacing-base-factor
length$spacing-map
string$spacing-linear
map$spacing-geometric
map$spacing-fibonacci
map
font-family
mixin that looks up a font-family value by namebreak-word-without-hyphen
mixin that breaks words that are too long for a container without a hyphenbreak-word-with-hyphen
mixin that breaks words that are too long for a container with a hypentruncate-with-ellipsis
mixin that truncates text that is too long for a container with an ellipsis
$font-family
string
- Better README
- Examples
- Improved naming conventions
- Modular scale typography