Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(documentation, styles): shadow utilities #4361

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/red-comics-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-documentation': major
'@swisspost/design-system-styles': major
---

Removed Bootstrap shadow utility classes from the Design System, as the elevation classes are replacing it.
2 changes: 2 additions & 0 deletions packages/styles/src/themes/bootstrap/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ $utilities: map.remove($utilities, 'overflow');
$utilities: map.remove($utilities, 'overflow-x');
$utilities: map.remove($utilities, 'overflow-y');

$utilities: map.remove($utilities, 'shadow');

@import 'bootstrap/scss/utilities/api';
1 change: 1 addition & 0 deletions packages/styles/src/utilities/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@use './functions' as *;

@use '../variables/sizing' as *;
@use '../variables/commons';
/*
Utilities are generated with our utility API using bellow $utilities map.

Expand Down
24 changes: 7 additions & 17 deletions packages/styles/src/variables/_elevation.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
@use 'sass:map';

// Values are kept in PX for easier copy-ability from figma and better overview
// rems would provide little value added
$elevation-1:
0.25px 1px 1px rgba(0, 0, 0, 0.1),
1px 2px 2.5px 1px rgba(0, 0, 0, 0.1);
$elevation-2:
0.25px 1.5px 2px rgba(0, 0, 0, 0.1),
2px 2px 5px 2px rgba(0, 0, 0, 0.11);
$elevation-3:
0.5px 3px 4px rgba(0, 0, 0, 0.1),
2px 4px 10px 4px rgba(0, 0, 0, 0.12);
$elevation-4:
0.75px 4.5px 6px rgba(0, 0, 0, 0.1),
2px 6px 15px 6px rgba(0, 0, 0, 0.13);
$elevation-5:
1px 6px 8px rgba(0, 0, 0, 0.1),
2px 8px 20px 8px rgba(0, 0, 0, 0.14);
$elevation-none: none;
$elevation-1: var(--post-core-elevation-1);
$elevation-2: var(--post-core-elevation-2);
$elevation-3: var(--post-core-elevation-3);
$elevation-4: var(--post-core-elevation-4);
$elevation-5: var(--post-core-elevation-5);

$elevation-map: () !default;
$elevation-map: map.merge(
$elevation-map,
(
'elevation-none': $elevation-none,
'elevation-1': $elevation-1,
'elevation-2': $elevation-2,
'elevation-3': $elevation-3,
Expand Down
Loading