GC Design SystemCSS Shortcuts
GC Design System Start to use Page templates overviewBasic page Components overviewAlertBreadcrumbsButtonCardCheckboxesContainerDate inputDate modifiedDetailsError messageError summaryFieldsetFile uploaderFooterGridHeaderHeadingIconInputLanguage toggleLinkNoticePaginationRadiosScreenreader-onlySearchSelectSide navigationSignatureStepperTableTextTextareaTheme and topic menuTop navigation CSS Shortcuts overview Reset styles Responsive layoutState Box sizingContainer sizingDisplayOverflowPositionVisibility FontFont familyFont sizeFont styleFont weightLine heightLink colourLink sizeLink text decorationList styleText alignText colourText overflowText transformWord break MarginPadding Align contentAlign itemsAlign selfFlexFlex directionFlex growFlex shrinkFlex wrapGapGrid columnsGrid rowsJustify contentJustify itemsJustify selfOrderPlace contentPlace itemsPlace self Background colourBorder colourBorder radiusBorder styleBorder width Icon namesIcon sizeImage CursorPointer eventsTransition Styles overviewDesign tokensColourSpacingTypography Contact usGet InvolvedFind a demo

Background colour

The background colour class sets the background-color property. It controls the colour of an element’s background. View GCDS colour guidance to choose the right background colour for your context. Overview
CSS Shortcut class Applied style
bg-primary
background-color: var(--gcds-bg-primary);
bg-active
background-color: var(--gcds-active-background);
bg-black
background-color: var(--gcds-color-grayscale-1000);
bg-current
background-color: currentColor;
bg-danger
background-color: var(--gcds-danger-background);
bg-dark
background-color: var(--gcds-bg-dark);
bg-disabled
background-color: var(--gcds-disabled-background);
bg-inherit
background-color: inherit;
bg-light
background-color: var(--gcds-bg-light);
bg-transparent
background-color: transparent;
bg-white
background-color: var(--gcds-bg-white);

Examples

Primary
bg-primary

This element uses the primary Government of Canada accent colour for its background.

<p class="bg-primary text-light">
  This element uses the primary Government of Canada accent
  colour for its background.
</p>

Active
bg-active

This element uses the active background colour.

<p class="bg-active text-light">
  This element uses the active background colour.
</p>

Black
bg-black

This element uses the black background colour.

<p class="bg-black text-light">
  This element uses the black background colour.
</p>

Current
bg-current

This element uses the background colour based on the current colour property.

<div class="bg-current" style="color: var(--gcds-color-blue-750)">
  <p class="text-light">
    This element uses the background colour based on the
    current colour property.
  </p>
</div>

Danger
bg-danger

This element uses the danger background colour.

<p class="bg-danger text-light">
  This element uses the danger background colour.
</p>

Dark
bg-dark

This element uses the dark background colour.

<p class="bg-dark text-light">
  This element uses the dark background colour.
</p>

Disabled
bg-disabled

This element uses the disabled background colour.

<p class="bg-disabled">
  This element uses the disabled background colour.
</p>

Inherit
bg-inherit

This element inherits its parent’s background colour.

<div class="bg-danger">
  <p class="bg-inherit text-light">
    This element inherits its parent’s background colour.
  </p>
</div>

Light
bg-light

This element uses the light background colour.

<p class="bg-light">
  This element uses the light background colour.
</p>

Transparent
bg-transparent

This element has a transparent background colour.

<p class="bg-transparent">
  This element has a transparent background colour.
</p>

White
bg-white

This element has a white background colour.

<div class="bg-dark">
  <p class="bg-white">
    This element has a white background colour.
  </p>
</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:bg-light ...">
  ...
</div>
Learn more about the responsive layout prefix. Apply this style to specific states Use a state prefix to apply this class only to a specified interaction state. The available states are:
  • hover
  • focus
<div class="hover:bg-light ...">
  ...
</div>
Learn more about the state prefix. 2026-02-12