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

Visibility

The visibility class sets the visibility property. It displays or hides an element without affecting the layout or flow of the document. Overview
CSS Shortcut class Applied style
visibility-hidden
visibility: hidden;
visibility-visible
visibility: visible;
visibility-sr-only
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;

Examples

Hidden
visibility-hidden

This element is hidden. It can’t receive focus but maintains its position in the document affecting the layout of other elements.

1

2

3

<div class="d-flex gap-300">
  <p>1</p>
  <p class="visibility-hidden">2</p>
  <p>3</p>
</div>

Visible
visibility-visible

This element is visible. It can apply to elements hidden at different screen sizes.

1

2

3

<div class="d-flex gap-300">
  <p>1</p>
  <p class="visibility-visible">2</p>
  <p>3</p>
</div>

Screenreader-only
visibility-sr-only

This element is only visible to assistive technologies.

1

2

3

<div class="d-flex gap-300">
  <p>1</p>
  <p class="visibility-sr-only">2</p>
  <p>3</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:visibility-hidden ...">
  ...
</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:visibility-hidden ...">
  ...
</div>
Learn more about the state prefix. 2025-10-20