@swisspost/design-system-styles 6.5.0 → 6.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
1
  @use '../variables/elevation';
2
+ @use '../mixins/elevation' as elevation-mx;
2
3
 
3
4
  @each $key, $value in elevation.$elevation-map {
4
5
  .#{$key} {
5
- box-shadow: #{$value};
6
+ @include elevation-mx.elevation($key);
6
7
  }
7
8
  }
@@ -55,6 +55,21 @@
55
55
  }
56
56
  }
57
57
 
58
+ // Post breakpoints width - e.g. w-sm-100
59
+ @each $breakpoint in map-keys(breakpoints.$grid-breakpoints) {
60
+ @include media-breakpoint-up($breakpoint) {
61
+ @if $breakpoint != 'xs' {
62
+ @each $prop, $abbrev in (width: w) {
63
+ @each $size, $length in spacing.$sizes {
64
+ .#{$abbrev}-#{$breakpoint}-#{$size} {
65
+ #{$prop}: $length !important;
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+
58
73
  // Generate responsive spacing utility classes, a lot of them
59
74
  $cache: ();
60
75
 
@@ -55,8 +55,7 @@
55
55
  }
56
56
 
57
57
  .tab-content {
58
- padding-top: spacing.$spacer;
59
- padding-bottom: spacing.$spacer;
58
+ margin-block: spacing.$spacer;
60
59
  }
61
60
 
62
61
  // Careful, this generates a lot of code
@@ -48,6 +48,15 @@
48
48
  }
49
49
 
50
50
  @function light-or-dark($background, $light-color: #fff, $dark-color: #000) {
51
+ /*
52
+ exception for Success-color issue #2227
53
+ the color is statically defined because the reference to the variable from here
54
+ would create a loop
55
+ */
56
+ @if ($background == #2c911c) {
57
+ @return 'dark';
58
+ }
59
+
51
60
  // Contrast ratio with a light color
52
61
  $contrast-light: contrast-ratio($background, $light-color);
53
62