@swisspost/design-system-styles 6.0.0 → 6.1.0

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.
@@ -23,8 +23,6 @@
23
23
  }
24
24
 
25
25
  .alert {
26
- $effective-line-height: (alert.$alert-line-height * alert.$alert-font-size);
27
-
28
26
  @extend %notification;
29
27
 
30
28
  min-height: 2 * alert.$alert-padding-y + alert.$alert-icon-size;
@@ -36,7 +36,6 @@
36
36
  color: var(--post-contrast-color);
37
37
  font-family: inherit;
38
38
  font-weight: button.$btn-font-weight;
39
- line-height: inherit;
40
39
  text-decoration: none !important; // For <a> tags, !important for hover
41
40
  white-space: nowrap; // Long content should never break in buttons
42
41
  }
@@ -1,6 +1,7 @@
1
1
  @forward './../variables/options';
2
2
 
3
3
  @use './../variables/color';
4
+ @use './../variables/type';
4
5
  @use './../variables/components/datepicker';
5
6
  @use './../variables/components/forms';
6
7
  @use './../variables/commons';
@@ -73,7 +74,7 @@ span.ngb-dp-navigation-chevron {
73
74
  color: rgba(var(--post-contrast-color-rgb), 0.6) !important;
74
75
  font-size: 1rem;
75
76
  font-style: normal !important;
76
- line-height: 1.47 !important;
77
+ line-height: type.$line-height-copy !important;
77
78
  width: 40px !important;
78
79
  height: auto !important;
79
80
  font-weight: normal;
@@ -21,7 +21,7 @@
21
21
  padding-inline: forms.$form-floating-padding-x;
22
22
  padding-block: calc(
23
23
  #{forms.$input-border-width} + #{forms.$form-floating-label-height * 0.5} - #{forms.$form-floating-label-font-size *
24
- type.$line-height-base * 0.5}
24
+ type.$line-height-copy * 0.5}
25
25
  );
26
26
  height: forms.$form-floating-label-height;
27
27
  border: 0;
@@ -99,10 +99,6 @@
99
99
  padding-bottom: 0;
100
100
  height: auto;
101
101
 
102
- option {
103
- height: 1em * forms.$form-floating-line-height;
104
- }
105
-
106
102
  ~ label {
107
103
  padding-top: forms.$input-padding-y-lg * forms.$form-floating-label-scale;
108
104
  padding-bottom: 0;
@@ -47,7 +47,6 @@
47
47
  h2 {
48
48
  overflow: hidden;
49
49
  font-size: 1.6rem; // Same as PostWeb
50
- line-height: 1.2;
51
50
  text-overflow: ellipsis;
52
51
  }
53
52
  }
@@ -13,8 +13,9 @@
13
13
  .top-navigation {
14
14
  button.nav-link {
15
15
  @include button-mixins.reset-button();
16
+ display: flex;
17
+ align-items: center;
16
18
  padding: nav.$nav-link-padding-y navbar.$navbar-nav-link-padding-x;
17
- line-height: var(--post-body-line-height);
18
19
 
19
20
  @include media-breakpoint-down(md) {
20
21
  padding: 1rem 3rem 1rem 0;
@@ -22,7 +22,6 @@
22
22
 
23
23
  > span {
24
24
  background-color: ButtonFace;
25
- line-height: 1;
26
25
  }
27
26
  }
28
27
  }
@@ -16,7 +16,7 @@
16
16
  in (
17
17
  margin: m,
18
18
  padding: p,
19
- line-height: lh,
19
+ /* Deprecated */ line-height: lh,
20
20
  height: h,
21
21
  max-height: mh,
22
22
  width: w,
@@ -10,65 +10,37 @@
10
10
  @use './../variables/color';
11
11
  @use './../variables/commons';
12
12
  @use './../variables/type';
13
+ @use './../variables/heading';
13
14
  @use './../variables/spacing';
14
15
  @use './../variables/components/paragraph';
15
16
  @use './../layouts/portal/type' as portal;
16
17
  @use './../placeholders/text';
17
18
  @use './../mixins/type' as type-mx;
18
19
 
19
- h1,
20
- .h1,
21
- h2,
22
- .h2,
23
- h3,
24
- .h3,
25
- h4,
26
- .h4,
27
- h5,
28
- .h5,
29
- h6,
30
- .h6 {
31
- font-weight: type.$font-weight-bold;
32
- }
33
-
34
- h6,
35
- .h6,
36
- .font-curve-tiny {
37
- @include type-mx.font-curve('tiny');
38
- }
39
-
40
- .font-curve-small {
41
- @include type-mx.font-curve('small');
42
- }
43
-
44
- .font-curve-regular {
45
- @include type-mx.font-curve('regular');
46
- }
47
-
48
- h5,
49
- .h5,
50
- .font-curve-bigger-regular {
51
- @include type-mx.font-curve('bigger-regular');
20
+ // Deprecated
21
+ @each $key, $curve in type.$font-curves {
22
+ .font-curve-#{$key} {
23
+ @include type-mx.font-curve($key);
24
+ }
52
25
  }
53
26
 
54
- h3,
55
- .h3,
56
- h4,
57
- .h4,
58
- .font-curve-medium {
59
- @include type-mx.font-curve('medium');
27
+ // Generate heading sizes using the sizes map and the font-curve mixin
28
+ @each $heading in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6') {
29
+ #{$heading},
30
+ .#{$heading} {
31
+ @include type-mx.font-curve('heading-sizes-#{$heading}', heading.$heading-sizes);
32
+ }
60
33
  }
61
34
 
62
- h2,
63
- .h2,
64
- .font-curve-large {
65
- @include type-mx.font-curve('large');
66
- }
35
+ @each $key, $font-size in type.$font-size-map {
36
+ .font-size-#{$key} {
37
+ font-size: $font-size;
67
38
 
68
- h1,
69
- .h1,
70
- .font-curve-big {
71
- @include type-mx.font-curve('big');
39
+ // Font sizes bigger than 24px can have a reduced line height
40
+ @if ($key >= 24) {
41
+ line-height: type.$line-height-heading;
42
+ }
43
+ }
72
44
  }
73
45
 
74
46
  .blockquote {
@@ -32,6 +32,7 @@
32
32
 
33
33
  // Hardcoded numbers come directly from design (new CI/CD)
34
34
  // line-height always depends on font-size
35
+ // Deprecated
35
36
  @function line-height-calc($val) {
36
37
  @if $val < px-to-rem(17) {
37
38
  @return 1.5;