GC Design System CSS Shortcuts
Home Start to use Page templates overview Basic page Components overview Breadcrumbs Button Card Checkboxes Container Date input Date modified Details Error message Error summary Fieldset File uploader Footer Grid Header Heading Icon Input Language toggle Link Notice Pagination Radios Screenreader-only Search Select Side navigation Signature Stepper Text Textarea Theme and topic menu Top navigation CSS shortcuts overview Reset styles Responsive layout State Box sizing Container sizing Display Overflow Position Visibility Font Font family Font size Font style Font weight Line height Link colour Link size Link text decoration List style Text align Text colour Text overflow Text transform Word break Margin Padding Align content Align items Align self Flex Flex direction Flex grow Flex shrink Flex wrap Gap Grid columns Grid rows Justify content Justify items Justify self Order Place content Place items Place self Background colour Border colour Border radius Border style Border width Icon names Icon size Image Cursor Pointer events Transition Styles overview Design tokens Colour tokens Spacing tokens Typography tokens Contact us Get involved Find a demo

Container sizing

The container class sets the max-width property. It changes the size of a container at different viewport sizes to create responsive layouts.

Overview

CSS Shortcut class Applied style
container-xs
max-width: 20rem
container-sm
max-width: 30rem
container-md
max-width: 48rem
container-lg
max-width: 62rem
container-xl
max-width: 71.25rem
container-full
max-width: 100%

Examples

Extra small
container-xs

This container has a max width of 20rem.
<div class="container-xs">
  This container has a max width of 20rem.
</div>

Small
container-sm

This container has a max width of 30rem.
<div class="container-sm">
  This container has a max width of 30rem.
</div>

Medium
container-md

This container has a max width of 48rem.
<div class="container-md">
  This container has a max width of 48rem.
</div>

Large
container-lg

This container has a max width of 62rem.
<div class="container-lg">
  This container has a max width of 62rem.
</div>

Extra large
container-xl

This container has a max width of 71.25rem.
<div class="container-xl">
  This container has a max width of 71.25rem.
</div>

Full
container-full

This container has a max width of 100%.
<div class="container-full">
  This container has a max width of 100%.
</div>

Conditional styling Apply this style to specific screen sizes Use a responsive layout prefix to apply this class only to a specified screen size. The available breakpoints are:

  • xs: > 480px
  • sm: > 640px
  • md: > 768px
  • lg: > 1024px
  • xl: > 1280px
  
<div class="xs:container-xl ...">
  ...
</div>
  

Learn more about the responsive layout prefix.

2025-10-01