Elevation functions
The design system includes a concept of elevation, which refers to how far an element appears to be raised above the canvas. Elevation affects both the surface colour and the size of the shadow cast by the element. This documentation explains how elevation is handled across light and dark modes and how to use shadow functions to achieve the correct elevation in your designs.
Understanding elevation
Elevation is a key aspect of our design system, influencing not just the shadow of an element but also its surface colour. As an element’s elevation increases, its shadow grows larger, and the surface colour may also change to reflect its raised position. This approach ensures a consistent look and feel across different themes and modes.
Using the shadow functions in sass
To apply shadows based on elevation, use the ds-shadow($name) function. This function accepts the name of the shadow type and returns the corresponding CSS variable.
Shadow values
Example source (SCSS)
Example output (CSS)
Combining elevation with surface colours
When applying elevation, it’s important to pair shadows with the appropriate surface colours to maintain visual consistency across different modes (light and dark).

Default elevation example (SCSS)
Raised elevation example (SCSS)
Overlay elevation example (SCSS)