Breakpoints
All pages should be built for mobile devices and then improved for larger screen. We recommend all pages are functional for the following breakpoints:
-
(320px)
xs20em -
(768px)
sm48em -
(1024px)
md64em -
(1200px)
lg75em
Sass Mixin
To use the breakpoints we recommend to use the the breakpoint mixin
@include breakpoint(option){
styles
}
Mixin options:
xs-only- 320px - 767px
sm- 768px and above
sm-only- 768px - 1023px
md- 1024px and above
md-only- 1024px - 1199px
lg- 1200px and above
Typography
- h1 / .page-title
-
xs: 26px / 26pxsm: 42px / 40px - h2 / .title
-
xs: 20px / 22pxsm: 22px / 24px - h3 / .sub-title
-
xs: 17px / 19pxsm: 19px / 21px
Colours
$white- #FFF
$wild-sand- #F6F5F3
$concrete- #F3F3F3
$pampas- #F3F2EE
$solitude- #EAF5FC
$grey-chateau- #A5A5A5
$mercury- #D6D2CE
$iron- #CCC
$jumbo- #888
$monsoon- #787878
$dark-grey- #555
$armadillo- #4A4A4A
$tuatara- #434343
$black- #000
$orient- #056582
$bondi-blue- #0A89AF
$cerulean- #0CA6D4
$onahau- #BFDCEE
$aqua-squeeze- #E2F0F5
Helpers
Hiding Elements
.n-hidden classes are available for all break-points as modifiers.
<div class="n-hidden">Hidden for all devices</div>
<div class="n-hidden--xs-only">Hidden for xs devices only</div>
<div class="n-hidden--sm">Hidden for sm devices and bigger</div>
<div class="n-hidden--sm-only">Hidden for sm devices only</div>
<div class="n-hidden--md">Hidden for md devices and bigger</div>
<div class="n-hidden--md-only">Hidden for md devices only</div>
<div class="n-hidden--lg">Hidden for lg devices and bigger</div>
<div class="n-hidden--lg-only">Hidden for lg devices only</div>
Live Example
Hidden for all devices
Hidden for xs devices only
Hidden for sm devices and bigger
Hidden for sm devices only
Hidden for md devices and bigger
Hidden for md devices only
Hidden for lg devices and bigger
Hidden for lg devices only
Retina Devices
.retina-only Show element on retina devices.
.retina-hidden Hide element on retina devices
Live Example
If retina this text will be shown
If non retina this text will shown
Sass Mixin
You could also use the Sass mixin:
@include retina(){
styles
}
Screen Readers
.sr-only class is available to hide text for visual users but allow users of screen-readers to see the content
<div class="sr-only">Hidden for all devices</div>
Live Example
>This is standard content, the next div has the sr-only class name
Hidden for visual users
SEO
If you are interested in learning more about SEO, please speak to our very own Laura Ireland
Further Reading
Hobo Web Tutorials are a great intro into some common topics
Styles Toolkit