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

Flex shrink

The flex shrink class sets the flex-shrink property. It controls how much a flex item shrinks when there isn’t enough space in the container. Overview
CSS Shortcut class Applied style
flex-shrink
flex-shrink: 1;
flex-shrink-0
flex-shrink: 0;

Examples

Shrink
flex-shrink

The item with the flex-shrink class reduces its size when space is limited, while the other two items keep their original size.

1

2

3

<div class="d-flex">
  <p class="flex-none" style="width: 28rem">1</p>
  <p class="flex-shrink" style="width: 28rem">2</p>
  <p class="flex-none" style="width: 28rem">3</p>
</div>

No shrink
flex-shrink-0

The item with the flex-shrink-0 class maintains its size when space is limited, while the other two items shrink to fit the container.

1

2

3

<div class="d-flex">
  <p class="flex-none" style="width: 28rem">1</p>
  <p class="flex-shrink-0" style="width: 28rem">2</p>
  <p class="flex-none" style="width: 28rem">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:flex-shrink ...">
  ...
</div>
Learn more about the responsive layout prefix. 2025-10-01