Accordions
Allows you to define the vertical padding.
Visual examples of classes that use the accordion mixin here
Mixins
Example usage
Alerts
Border and text colours have default settings, but background colour is required.
Visual examples of classes that use the alert mixin here.
Mixin
Example usage
Animation fade in/out
These mixins use keyframe animations that toggles the opacity.
A duration can be passed as an argument or left as default.
Mixins
Example usage
Animation pop up fade in
This mixin makes the element position: relative
and uses a keyframe animation which makes the element top: 100%
and opacity: 0
and animates it to top: 0
and opacity: 1
.
A duration can be passed as an argument or left as default.
Mixin
Example usage
Animation rotate
This mixin rotates an element infinitely and at .2 seconds duration by default.
Mixin
Example usage
Animation slides
This mixin slides content up and down using a max height transition.
The mixin slide-down-collapsed
should be applied to the collapsed element and slide-down-active
should be applied to the element when it is open/active.
Note that because the max-height is used to perform the animation, an approximate max-height is required on the slide-down-active
mixin. If the height is too large it will cause a delay in the animation and if it is too small it will not open fully.
Visual examples of accordions that use the slide mixins here.
Mixin
Example usage
Aspect ratio
This mixin is available instead of using a transparent image as a hack to maintain aspect ratio which is very handy for making video iframes act responsively.
The content needs to go in a nested element called .aspect-ratio-content
.
Mixin
Example usage
Container
This is useful to define the main container of your site/app as it makes the container centred, gives horizontal spacing for mobile and desktop as well as a max width.
Note that the container mixin includes the horizontal-spacing
mixin here, so it will use the default spacing set unless you reset the mixin arguments.
Mixin
Example usage
Custom icon lists
Allows you to define your own custom icon for featured lists.
Visual examples of classes that use the featured icon list mixins here.
Mixins
Example usage
Form controls
Mixins for form controls and their hover/focus/disabled states.
The mixins all include default settings so can be used with or without arguments passed in the parameters.
Visual examples of classes that use the input mixins here
Mixins
Example usage
Mixin
Example usage
Full overlay
Creates an element with full height and width and absolute positioned pinned to all corners.
Useful to use on an element or a before/after element.
Mixin
Example usage
Headings
The heading-style mixin defines general heading styling such as font weight, padding etc.
The heading-style-responsive mixin defines the font sizes passed in for mobile and desktop as well as includes the heading-style mixin.
Note that font sizes should be declared in rems as explained in more detail here.
Visual examples of classes that use the heading mixins here
Mixin
Example usage
Horizontal spacing
Defines padding on the right and left for mobile and desktop.
Mixin
Example usage
Icons in circles
Each mixin does a different job and can be used one at the time or all at once on an element
Note that all mixins here have default values that can be used by not passing any arguments or overriden by passing arguments
Visual examples of classes that use the icons-in-circles mixins here
Mixins
Example usage
Inline list gutter
Mixin
Example usage
Margin
A shorthand notation for defining margin with null values
Mixin
Example usage
Media queries
Mixins for mobile first media query breakpoints, based on screen widths.
Breakpoints are defined in EMs to cater cross browser for users who zoom in or change their font size settings. There are various articles explaining conclusions to these experiments such as zellwk.com and cloudfour.com.
Mixins
24em (384px) and above:
40em (640px) and above:
50em (800px) and above:
68em (1088px) and above:
100em (1600px) and above:
Example usage
Padding
A shorthand notation for defining padding with null values
Mixin
Example usage
Positioning
A shorthand notation for positioning elements
Mixin
Example usage
Helpers
Some handy helpers
Mixins
Clearfix:
Align content centre using flexbox:
Removes default list styling:
Removes default link styling (Once can be added to the anchor itself and the other on a wrapping element):
Style to appear clickable (pointer as cursor and opacity on hover/active/focus):
Hides text but not before/after element:
Sets background centre, cover and no repeat:
Hides text with a text indent and overflow hidden:
Sets margin right and left to auto: