Breakpoints

Helping to control the fun.


Minimum and maximum screen sizes

The minimum and maximum screen sizes we support are:

  • min: 320px
  • max: 1140px

Viewports over the max screen size will show as a single centered 1140px column.

There’s a wonderful little mixin you can use, called full-width-container, which will automatically add our max-widths and margin behaviour for you.

.class {
  @include full-width-container();
}

Breakpoints

There are 4 major breakpoints: tiny, small, medium and large. You can use as many minor breakpoints as required.

Tiny is the minimum width a page can be.

If you need a change to happen in-line with major page changes (e.g. typography and nav bar) then you should use the medium and large breakpoints.

Otherwise you should add minor breakpoints where required.

How to use breakpoints:

  • Start by viewing the UI at the small breakpoint
  • Stretch the viewport horizontally until the UI breaks or doesn’t look great
  • At the point the UI breaks, add a breakpoint to insert the styling required to fix

Major breakpoint values:

  • tiny: 320px
  • small: 360px
  • medium: 768px
  • large : 992px

How we use them

Major breakpoint values can be obtained by using the getBreakpoint($size) function, where $size is the English term for the size required.

How they look:

To add a medium breakpoint to an element:

.el {
    ...

    @media screen and (min-width: getBreakpoint(medium)) {
      ...
    }
}

Design Tokens

Sass JSON Less Value
$gg-breakpoint-large gg-breakpoint.large @gg-breakpoint-large 992px
$gg-breakpoint-medium gg-breakpoint.medium @gg-breakpoint-medium 768px
$gg-breakpoint-small gg-breakpoint.small @gg-breakpoint-small 360px
$gg-breakpoint-tiny gg-breakpoint.tiny @gg-breakpoint-tiny 320px

Some useful layout tokens

Sass JSON Less Value
$gg-layout-header-height gg-layout.header-height @gg-layout-header-height 56px
$gg-layout-max-width gg-layout.max-width @gg-layout-max-width 1140px
$gg-layout-min-width gg-layout.min-width @gg-layout-min-width 320px