@swisspost/design-system-styles 6.2.1 → 6.2.2

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.
package/basics.scss CHANGED
@@ -3,6 +3,7 @@
3
3
  @use './lic/bootstrap-license';
4
4
 
5
5
  @use 'components/base';
6
+ @use 'components/elevation';
6
7
  @use 'components/type';
7
8
  @use 'components/utilities';
8
9
  @use 'components/sizing';
@@ -11,6 +11,7 @@
11
11
  @use 'card';
12
12
  @use 'carousel';
13
13
  @use 'close';
14
+ @use 'elevation';
14
15
  @use 'form-range';
15
16
  @use 'form-select';
16
17
  @use 'datatable';
@@ -176,7 +176,7 @@
176
176
  align-self: stretch;
177
177
 
178
178
  .btn {
179
- flex: 1 0 100%;
179
+ flex: 1 0 auto;
180
180
  }
181
181
  }
182
182
  }
@@ -0,0 +1,7 @@
1
+ @use '../variables/elevation';
2
+
3
+ @each $key, $value in elevation.$elevation-map {
4
+ .#{$key} {
5
+ box-shadow: #{$value};
6
+ }
7
+ }
@@ -19,15 +19,16 @@
19
19
  left: forms.$input-border-width;
20
20
  margin: 0;
21
21
  padding-inline: forms.$form-floating-padding-x;
22
- padding-block: calc(
22
+ padding-top: calc(
23
23
  #{forms.$input-border-width} + #{forms.$form-floating-label-height * 0.5} - #{forms.$form-floating-label-font-size *
24
24
  type.$line-height-copy * 0.5}
25
25
  );
26
- height: forms.$form-floating-label-height;
26
+ padding-bottom: 0;
27
27
  border: 0;
28
28
  color: forms.$form-floating-label-color;
29
29
  font-size: forms.$form-floating-label-font-size;
30
30
  width: auto;
31
+ height: auto;
31
32
  max-width: calc(100% - (forms.$input-border-width * 2));
32
33
  white-space: nowrap;
33
34
  overflow: hidden;
@@ -41,7 +41,7 @@
41
41
  }
42
42
  }
43
43
 
44
- @each $name, $path in vars.$svg-icon-map {
44
+ @each $name in vars.$legacy-icon-set {
45
45
  .pi-#{$name} {
46
46
  @include icon-mixin.pi($name);
47
47
  }
@@ -48,7 +48,7 @@
48
48
  justify-self: end;
49
49
  align-items: end;
50
50
  text-align: right;
51
- transform: translateX(#{0.5 * stepper.$stepper-indicator-height});
51
+ margin-right: -0.5 * stepper.$stepper-indicator-height;
52
52
  }
53
53
 
54
54
  &:not(:first-child):not(:last-child) {
@@ -86,6 +86,7 @@
86
86
  opacity: 1;
87
87
  background-color: nav.$nav-tabs-link-active-bg;
88
88
  color: var(--post-contrast-color);
89
+ box-shadow: none;
89
90
 
90
91
  &::after {
91
92
  content: '';
@@ -3,21 +3,39 @@
3
3
  @use './../lic/bootstrap-license';
4
4
  @use './../themes/bootstrap/tooltip' as bt;
5
5
 
6
+ @use './../variables/components/tooltips';
7
+
6
8
  // There's a 1px-gap between the arrow and the tooltip-body.
7
9
  // We can fix that by moving the arrow to the opposite direction, according to the tooltip-positioning (position top -> move direction bottom etc)
8
10
 
9
- .bs-tooltip-top .arrow {
10
- bottom: 1px;
11
+ .bs-tooltip-top {
12
+ margin-bottom: tooltips.$tooltip-arrow-height !important;
13
+
14
+ .arrow {
15
+ bottom: 1px;
16
+ }
11
17
  }
12
18
 
13
- .bs-tooltip-right .arrow {
14
- left: 1px;
19
+ .bs-tooltip-end {
20
+ margin-left: tooltips.$tooltip-arrow-height !important;
21
+
22
+ .arrow {
23
+ left: 1px;
24
+ }
15
25
  }
16
26
 
17
- .bs-tooltip-bottom .arrow {
18
- top: 1px;
27
+ .bs-tooltip-bottom {
28
+ margin-top: tooltips.$tooltip-arrow-height !important;
29
+
30
+ .arrow {
31
+ top: 1px;
32
+ }
19
33
  }
20
34
 
21
- .bs-tooltip-left .arrow {
22
- right: 1px;
35
+ .bs-tooltip-start {
36
+ margin-right: tooltips.$tooltip-arrow-height !important;
37
+
38
+ .arrow {
39
+ right: 1px;
40
+ }
23
41
  }
@@ -1,6 +1,7 @@
1
1
  @forward './../variables/options';
2
2
 
3
3
  @use 'sass:map';
4
+ @use 'sass:color' as sass-color;
4
5
  @use 'sass:list';
5
6
  @use './../lic/bootstrap-license';
6
7
  @use './../themes/bootstrap/core' as *;
@@ -66,6 +67,7 @@ span.spacer {
66
67
  @each $name, $color in color.$background-colors {
67
68
  .bg-#{$name} {
68
69
  --post-bg-rgb: #{color-fn.rgb-values($color)};
70
+
69
71
  @extend %color-background-rgba;
70
72
 
71
73
  @if (contrast-fn.light-or-dark($color) == 'dark') {
@@ -1,8 +1,8 @@
1
1
  @use 'sass:map';
2
- @use 'sass:string';
3
- @use './../variables/icons';
2
+
3
+ @use './color';
4
4
  @use './utilities';
5
- @use './../functions/color';
5
+ @use './../variables/icons';
6
6
 
7
7
  @function add-fill-color($svg, $color) {
8
8
  $opacity: alpha($color);
@@ -47,25 +47,29 @@
47
47
  }
48
48
 
49
49
  @function get-colored-svg-url($icon-name, $color) {
50
- $pathdefinition: map.get(icons.$svg-icon-map, #{$icon-name});
50
+ $svg-url: '';
51
51
 
52
- @if (not map.has-key(icons.$svg-icon-map, #{$icon-name})) {
52
+ @if (map.has-key(icons.$svg-icon-map, #{$icon-name})) {
53
+ $svg-url: map.get(icons.$svg-icon-map, #{$icon-name});
54
+ } @else if(map.has-key(icons.$svg-unofficial-icon-map, #{$icon-name})) {
55
+ $svg-url: icons.$svg-pre-path +
56
+ map.get(icons.$svg-unofficial-icon-map, #{$icon-name}) +
57
+ icons.$svg-post-path;
58
+ } @else {
53
59
  @error "Icon '#{$icon-name}' does not exist.";
54
60
  }
55
61
 
56
- $svg-url: add-fill-color(icons.$svg-pre-path + $pathdefinition + icons.$svg-post-path, $color);
57
-
58
- @return $svg-url;
62
+ @return add-fill-color($svg-url, $color);
59
63
  }
60
64
 
61
65
  @function get-pre-colored-svg-url($icon-name) {
62
- $pathdefinition: map.get(icons.$svg-pre-colored-icon-map, #{$icon-name});
66
+ $path-definition: map.get(icons.$svg-pre-colored-icon-map, #{$icon-name});
63
67
 
64
68
  @if (not map.has-key(icons.$svg-pre-colored-icon-map, #{$icon-name})) {
65
69
  @error "Icon '#{$icon-name}' does not exist.";
66
70
  }
67
71
 
68
- $svg-url: icons.$svg-pre-path + $pathdefinition + icons.$svg-post-path;
72
+ $svg-url: icons.$svg-pre-path + $path-definition + icons.$svg-post-path;
69
73
 
70
74
  @return $svg-url;
71
75
  }