@amsterdam/design-system-css 0.14.1 → 0.15.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.
Files changed (187) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +2 -0
  3. package/dist/accordion/accordion.css +1 -1
  4. package/dist/accordion/accordion.css.map +1 -1
  5. package/dist/action-group/action-group.css +1 -1
  6. package/dist/action-group/action-group.css.map +1 -1
  7. package/dist/alert/alert.css +1 -1
  8. package/dist/alert/alert.css.map +1 -1
  9. package/dist/aspect-ratio/aspect-ratio.css +1 -1
  10. package/dist/aspect-ratio/aspect-ratio.css.map +1 -1
  11. package/dist/avatar/avatar.css +1 -1
  12. package/dist/avatar/avatar.css.map +1 -1
  13. package/dist/badge/badge.css +1 -1
  14. package/dist/badge/badge.css.map +1 -1
  15. package/dist/blockquote/blockquote.css +1 -1
  16. package/dist/blockquote/blockquote.css.map +1 -1
  17. package/dist/breadcrumb/breadcrumb.css +1 -1
  18. package/dist/breadcrumb/breadcrumb.css.map +1 -1
  19. package/dist/breakout/breakout.css +1 -1
  20. package/dist/breakout/breakout.css.map +1 -1
  21. package/dist/button/button.css +1 -1
  22. package/dist/button/button.css.map +1 -1
  23. package/dist/card/card.css +1 -1
  24. package/dist/card/card.css.map +1 -1
  25. package/dist/character-count/character-count.css +1 -1
  26. package/dist/character-count/character-count.css.map +1 -1
  27. package/dist/checkbox/checkbox.css +1 -1
  28. package/dist/checkbox/checkbox.css.map +1 -1
  29. package/dist/column/column.css +1 -1
  30. package/dist/column/column.css.map +1 -1
  31. package/dist/date-input/date-input.css +1 -1
  32. package/dist/date-input/date-input.css.map +1 -1
  33. package/dist/description-list/description-list.css +1 -1
  34. package/dist/description-list/description-list.css.map +1 -1
  35. package/dist/dialog/dialog.css +1 -1
  36. package/dist/dialog/dialog.css.map +1 -1
  37. package/dist/error-message/error-message.css +1 -1
  38. package/dist/error-message/error-message.css.map +1 -1
  39. package/dist/field-set/field-set.css +1 -1
  40. package/dist/field-set/field-set.css.map +1 -1
  41. package/dist/figure/figure.css +1 -1
  42. package/dist/figure/figure.css.map +1 -1
  43. package/dist/file-input/file-input.css +1 -1
  44. package/dist/file-input/file-input.css.map +1 -1
  45. package/dist/file-list/file-list.css +1 -1
  46. package/dist/file-list/file-list.css.map +1 -1
  47. package/dist/footer/footer.css +1 -1
  48. package/dist/footer/footer.css.map +1 -1
  49. package/dist/gap/gap.css +1 -1
  50. package/dist/gap/gap.css.map +1 -1
  51. package/dist/grid/grid.css +1 -1
  52. package/dist/grid/grid.css.map +1 -1
  53. package/dist/header/header.css +1 -1
  54. package/dist/header/header.css.map +1 -1
  55. package/dist/heading/heading.css +1 -1
  56. package/dist/heading/heading.css.map +1 -1
  57. package/dist/icon/icon.css +1 -1
  58. package/dist/icon/icon.css.map +1 -1
  59. package/dist/icon-button/icon-button.css +1 -1
  60. package/dist/icon-button/icon-button.css.map +1 -1
  61. package/dist/image-slider/image-slider.css +1 -1
  62. package/dist/image-slider/image-slider.css.map +1 -1
  63. package/dist/index.css +1 -1
  64. package/dist/index.css.map +1 -1
  65. package/dist/invalid-form-alert/invalid-form-alert.css +1 -0
  66. package/dist/invalid-form-alert/invalid-form-alert.css.map +1 -0
  67. package/dist/label/label.css +1 -1
  68. package/dist/label/label.css.map +1 -1
  69. package/dist/link/link.css +1 -1
  70. package/dist/link/link.css.map +1 -1
  71. package/dist/link-list/link-list.css +1 -1
  72. package/dist/link-list/link-list.css.map +1 -1
  73. package/dist/margin/margin.css +1 -1
  74. package/dist/margin/margin.css.map +1 -1
  75. package/dist/ordered-list/ordered-list.css +1 -1
  76. package/dist/ordered-list/ordered-list.css.map +1 -1
  77. package/dist/page-heading/page-heading.css +1 -1
  78. package/dist/page-heading/page-heading.css.map +1 -1
  79. package/dist/page-menu/page-menu.css +1 -1
  80. package/dist/page-menu/page-menu.css.map +1 -1
  81. package/dist/pagination/pagination.css +1 -1
  82. package/dist/pagination/pagination.css.map +1 -1
  83. package/dist/paragraph/paragraph.css +1 -1
  84. package/dist/paragraph/paragraph.css.map +1 -1
  85. package/dist/password-input/password-input.css +1 -1
  86. package/dist/password-input/password-input.css.map +1 -1
  87. package/dist/radio/radio.css +1 -1
  88. package/dist/radio/radio.css.map +1 -1
  89. package/dist/row/row.css +1 -1
  90. package/dist/row/row.css.map +1 -1
  91. package/dist/search-field/search-field.css +1 -1
  92. package/dist/search-field/search-field.css.map +1 -1
  93. package/dist/select/select.css +1 -1
  94. package/dist/select/select.css.map +1 -1
  95. package/dist/spotlight/spotlight.css +1 -1
  96. package/dist/spotlight/spotlight.css.map +1 -1
  97. package/dist/switch/switch.css +1 -1
  98. package/dist/switch/switch.css.map +1 -1
  99. package/dist/table-of-contents/table-of-contents.css +1 -1
  100. package/dist/table-of-contents/table-of-contents.css.map +1 -1
  101. package/dist/tabs/tabs.css +1 -1
  102. package/dist/tabs/tabs.css.map +1 -1
  103. package/dist/text-area/text-area.css +1 -1
  104. package/dist/text-area/text-area.css.map +1 -1
  105. package/dist/text-input/text-input.css +1 -1
  106. package/dist/text-input/text-input.css.map +1 -1
  107. package/dist/time-input/time-input.css +1 -1
  108. package/dist/time-input/time-input.css.map +1 -1
  109. package/dist/top-task-link/top-task-link.css +1 -1
  110. package/dist/top-task-link/top-task-link.css.map +1 -1
  111. package/dist/unordered-list/unordered-list.css +1 -1
  112. package/dist/unordered-list/unordered-list.css.map +1 -1
  113. package/package.json +4 -4
  114. package/src/common/hyphenation.scss +3 -3
  115. package/src/components/accordion/accordion.scss +5 -6
  116. package/src/components/action-group/README.md +1 -1
  117. package/src/components/action-group/action-group.scss +1 -1
  118. package/src/components/alert/README.md +13 -15
  119. package/src/components/alert/alert.scss +29 -14
  120. package/src/components/aspect-ratio/README.md +8 -8
  121. package/src/components/aspect-ratio/aspect-ratio.scss +6 -3
  122. package/src/components/avatar/README.md +5 -4
  123. package/src/components/avatar/avatar.scss +8 -46
  124. package/src/components/badge/README.md +7 -6
  125. package/src/components/badge/badge.scss +13 -40
  126. package/src/components/blockquote/blockquote.scss +1 -1
  127. package/src/components/breadcrumb/breadcrumb.scss +2 -0
  128. package/src/components/breakout/breakout.scss +4 -4
  129. package/src/components/button/README.md +1 -1
  130. package/src/components/button/button.scss +4 -1
  131. package/src/components/card/card.scss +19 -22
  132. package/src/components/character-count/character-count.scss +2 -0
  133. package/src/components/checkbox/checkbox.scss +6 -7
  134. package/src/components/column/column.scss +9 -8
  135. package/src/components/date-input/date-input.scss +3 -4
  136. package/src/components/description-list/description-list.scss +12 -10
  137. package/src/components/dialog/dialog.scss +17 -5
  138. package/src/components/error-message/error-message.scss +2 -0
  139. package/src/components/field-set/field-set.scss +1 -1
  140. package/src/components/figure/figure.scss +3 -1
  141. package/src/components/file-input/file-input.scss +2 -2
  142. package/src/components/file-list/file-list.scss +2 -1
  143. package/src/components/footer/README.md +3 -2
  144. package/src/components/footer/footer.scss +41 -2
  145. package/src/components/gap/README.md +13 -9
  146. package/src/components/gap/gap.scss +8 -12
  147. package/src/components/grid/_mixins.scss +14 -12
  148. package/src/components/header/README.md +1 -0
  149. package/src/components/header/header.scss +30 -18
  150. package/src/components/heading/README.md +7 -7
  151. package/src/components/heading/heading.scss +19 -19
  152. package/src/components/icon/README.md +5 -5
  153. package/src/components/icon/icon.scss +42 -29
  154. package/src/components/icon-button/icon-button.scss +16 -15
  155. package/src/components/image-slider/image-slider.scss +11 -3
  156. package/src/components/index.scss +1 -1
  157. package/src/components/{form-error-list → invalid-form-alert}/README.md +9 -9
  158. package/src/components/{form-error-list/form-error-list.scss → invalid-form-alert/invalid-form-alert.scss} +4 -4
  159. package/src/components/link/README.md +1 -2
  160. package/src/components/link/link.scss +9 -20
  161. package/src/components/link-list/link-list.scss +7 -8
  162. package/src/components/margin/README.md +16 -10
  163. package/src/components/margin/margin.scss +6 -8
  164. package/src/components/ordered-list/ordered-list.scss +3 -1
  165. package/src/components/page-heading/page-heading.scss +1 -1
  166. package/src/components/page-menu/page-menu.scss +0 -2
  167. package/src/components/pagination/pagination.scss +23 -34
  168. package/src/components/paragraph/paragraph.scss +3 -1
  169. package/src/components/password-input/password-input.scss +2 -3
  170. package/src/components/radio/radio.scss +4 -5
  171. package/src/components/row/row.scss +9 -9
  172. package/src/components/screen/README.md +6 -6
  173. package/src/components/search-field/search-field.scss +2 -3
  174. package/src/components/select/select.scss +2 -2
  175. package/src/components/spotlight/README.md +5 -2
  176. package/src/components/spotlight/spotlight.scss +6 -10
  177. package/src/components/switch/switch.scss +2 -2
  178. package/src/components/table-of-contents/table-of-contents.scss +2 -0
  179. package/src/components/tabs/tabs.scss +6 -3
  180. package/src/components/text-area/text-area.scss +1 -2
  181. package/src/components/text-input/text-input.scss +2 -3
  182. package/src/components/time-input/time-input.scss +3 -4
  183. package/src/components/top-task-link/top-task-link.scss +3 -3
  184. package/src/components/unordered-list/unordered-list.scss +3 -1
  185. package/dist/form-error-list/form-error-list.css +0 -1
  186. package/dist/form-error-list/form-error-list.css.map +0 -1
  187. package/src/common/size.scss +0 -14
@@ -7,7 +7,7 @@
7
7
  @use "../../common/text-rendering" as *;
8
8
 
9
9
  @mixin reset-fieldset {
10
- border: 0;
10
+ border: none;
11
11
  margin-inline: 0;
12
12
  padding-block: 0;
13
13
  padding-inline: 0;
@@ -3,6 +3,7 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
9
  @mixin reset-figure {
@@ -25,9 +26,10 @@
25
26
  font-weight: var(--ams-figure-caption-font-weight);
26
27
  line-height: var(--ams-figure-caption-line-height);
27
28
 
29
+ @include hyphenation;
28
30
  @include text-rendering;
29
31
  }
30
32
 
31
- .ams-figure__caption--inverse-color {
33
+ .ams-figure__caption--inverse {
32
34
  color: var(--ams-figure-caption-inverse-color);
33
35
  }
@@ -6,7 +6,7 @@
6
6
  @use "../../common/text-rendering" as *;
7
7
 
8
8
  @mixin reset-button {
9
- border: 0;
9
+ border: none;
10
10
  border-radius: 0; // Reset rounded borders on iOS devices
11
11
  }
12
12
 
@@ -21,7 +21,7 @@
21
21
  font-weight: var(--ams-file-input-font-weight);
22
22
  inline-size: 100%;
23
23
  line-height: var(--ams-file-input-line-height);
24
- outline-offset: calc(var(--ams-focus-outline-offset) * 2); // Compensate for the dashed border
24
+ outline-offset: var(--ams-file-input-outline-offset);
25
25
  padding-block: var(--ams-file-input-padding-block);
26
26
  padding-inline: var(--ams-file-input-padding-inline);
27
27
  touch-action: manipulation;
@@ -3,6 +3,7 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
9
  @mixin reset-ul {
@@ -17,13 +18,13 @@
17
18
  gap: var(--ams-file-list-gap);
18
19
  padding-block: var(--ams-file-list-padding-block);
19
20
 
21
+ @include hyphenation;
20
22
  @include text-rendering;
21
23
  @include reset-ul;
22
24
  }
23
25
 
24
26
  .ams-file-list__item {
25
27
  display: flex;
26
- flex-direction: row;
27
28
  font-family: var(--ams-file-list-file-font-family);
28
29
  font-size: var(--ams-file-list-file-font-size);
29
30
  font-weight: var(--ams-file-list-file-font-weight);
@@ -6,8 +6,9 @@ Provides service information at the bottom of every page.
6
6
 
7
7
  ## Guidelines
8
8
 
9
- - The Footer usually consists of two sections: a full-width blue area and a [Page Menu](/docs/components-navigation-page-menu--docs) below it.
10
- - A Footer containing only a Page Menu can be sufficient for applications.
9
+ - The Footer usually consists of two sections: a full-width blue area and a `Footer.Menu` below it.
10
+ - Both sections are preceded by a visually hidden `Heading` for accessibility.
11
+ - A Footer containing only a `Footer.Menu` can be sufficient for applications.
11
12
  - The Footer must be used on all websites for the City of Amsterdam.
12
13
  - It must be the same on every page.
13
14
 
@@ -3,6 +3,45 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- .ams-footer__top {
7
- background-color: var(--ams-footer-top-background-color);
6
+ @use "../../common/hyphenation" as *;
7
+ @use "../../common/text-rendering" as *;
8
+
9
+ @mixin reset-ul {
10
+ list-style: none;
11
+ margin-block: 0;
12
+ }
13
+
14
+ .ams-footer__spotlight {
15
+ background-color: var(--ams-footer-spotlight-background-color);
16
+ }
17
+
18
+ .ams-footer__menu {
19
+ column-gap: var(--ams-footer-menu-column-gap);
20
+ display: flex;
21
+ flex-wrap: wrap;
22
+ padding-block: var(--ams-footer-menu-padding-block);
23
+ padding-inline: var(--ams-footer-menu-padding-inline);
24
+ row-gap: var(--ams-footer-menu-row-gap);
25
+
26
+ @include reset-ul;
27
+ }
28
+
29
+ .ams-footer__menu-link {
30
+ color: var(--ams-footer-menu-link-color);
31
+ font-family: var(--ams-footer-menu-link-font-family);
32
+ font-size: var(--ams-footer-menu-link-font-size);
33
+ font-weight: var(--ams-footer-menu-link-font-weight);
34
+ line-height: var(--ams-footer-menu-link-line-height);
35
+ outline-offset: var(--ams-footer-menu-link-outline-offset);
36
+ text-decoration-line: var(--ams-footer-menu-link-text-decoration-line);
37
+ text-decoration-thickness: var(--ams-footer-menu-link-text-decoration-thickness);
38
+ text-underline-offset: var(--ams-footer-menu-link-text-underline-offset);
39
+
40
+ @include hyphenation;
41
+ @include text-rendering;
42
+
43
+ &:hover {
44
+ color: var(--ams-footer-menu-link-hover-color);
45
+ text-decoration-line: var(--ams-footer-menu-link-hover-text-decoration-line);
46
+ }
8
47
  }
@@ -6,15 +6,19 @@ Adds white space between a set of elements.
6
6
 
7
7
  ## Class names
8
8
 
9
- The five sizes of [Component Space](/docs/brand-design-tokens-space--docs) are available for the width or height of the gap.
10
-
11
- | Class name | Example |
12
- | ------------- | ----------------------------------------------------------------------------------------- |
13
- | `ams-gap--xs` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-xs);" /> |
14
- | `ams-gap--sm` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-sm);" /> |
15
- | `ams-gap--md` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-md);" /> |
16
- | `ams-gap--lg` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-lg);" /> |
17
- | `ams-gap--xl` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-xl);" /> |
9
+ Five options are available for the width or height of the gap:
10
+
11
+ - `ams-gap-xs`
12
+ - `ams-gap-s`
13
+ - `ams-gap-m`
14
+ - `ams-gap-l`
15
+ - `ams-gap-xl`
16
+
17
+ Because spacing is responsive, the gaps are as well.
18
+ They are also smaller in Compact Mode.
19
+ Consult the [Space](/docs/brand-design-tokens-space--docs) docs for an indication of their sizes.
20
+
21
+ The `2xl` space is intended for whitespace around a [Grid](/docs/components-layout-grid--docs) only, which can be produced through a `padding*` of `large`.
18
22
 
19
23
  ## Guidelines
20
24
 
@@ -3,17 +3,13 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- @use "sass:map";
7
- @use "../../common/size" as *;
8
-
9
- [class|="ams-gap-"] {
10
- display: grid !important;
11
- }
12
-
13
- @each $size in map.keys($ams-sizes) {
14
- @if $size != "no" {
15
- .ams-gap--#{$size} {
16
- grid-gap: var(--ams-gap-#{$size}) !important;
17
- }
6
+ // If you modify this list, you must also update the object in
7
+ // packages/react/src/common/shortSize.ts
8
+ // Note that we don’t offer a 2xl gap on purpose.
9
+ @each $size in ("xs", "s", "m", "l", "xl") {
10
+ .ams-gap-#{$size} {
11
+ display: grid !important;
12
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
13
+ gap: var(--ams-space-#{$size}) !important;
18
14
  }
19
15
  }
@@ -10,14 +10,16 @@
10
10
  display: grid;
11
11
  grid-template-columns: repeat(var(--ams-grid-column-count), 1fr);
12
12
  padding-inline: var(--ams-grid-padding-inline);
13
- row-gap: var(--ams-grid-row-gap-md);
13
+ row-gap: var(--ams-grid-row-gap-m);
14
14
 
15
15
  @media screen and (min-width: $ams-breakpoint-medium) {
16
16
  grid-template-columns: repeat(var(--ams-grid-medium-column-count), 1fr);
17
+ padding-inline: var(--ams-grid-medium-padding-inline);
17
18
  }
18
19
 
19
20
  @media screen and (min-width: $ams-breakpoint-wide) {
20
21
  grid-template-columns: repeat(var(--ams-grid-wide-column-count), 1fr);
22
+ padding-inline: var(--ams-grid-wide-padding-inline);
21
23
  }
22
24
  }
23
25
 
@@ -28,49 +30,49 @@
28
30
  }
29
31
 
30
32
  @mixin ams-grid--gap-vertical--small {
31
- row-gap: var(--ams-grid-row-gap-sm);
33
+ row-gap: var(--ams-grid-row-gap-s);
32
34
  }
33
35
 
34
36
  @mixin ams-grid--gap-vertical--large {
35
- row-gap: var(--ams-grid-row-gap-lg);
37
+ row-gap: var(--ams-grid-row-gap-l);
36
38
  }
37
39
 
38
40
  // Grid padding
39
41
 
40
42
  @mixin ams-grid--padding-bottom--small {
41
- padding-block-end: var(--ams-grid-padding-block-sm);
43
+ padding-block-end: var(--ams-grid-padding-block-s);
42
44
  }
43
45
 
44
46
  @mixin ams-grid--padding-bottom--medium {
45
- padding-block-end: var(--ams-grid-padding-block-md);
47
+ padding-block-end: var(--ams-grid-padding-block-m);
46
48
  }
47
49
 
48
50
  @mixin ams-grid--padding-bottom--large {
49
- padding-block-end: var(--ams-grid-padding-block-lg);
51
+ padding-block-end: var(--ams-grid-padding-block-l);
50
52
  }
51
53
 
52
54
  @mixin ams-grid--padding-top--small {
53
- padding-block-start: var(--ams-grid-padding-block-sm);
55
+ padding-block-start: var(--ams-grid-padding-block-s);
54
56
  }
55
57
 
56
58
  @mixin ams-grid--padding-top--medium {
57
- padding-block-start: var(--ams-grid-padding-block-md);
59
+ padding-block-start: var(--ams-grid-padding-block-m);
58
60
  }
59
61
 
60
62
  @mixin ams-grid--padding-top--large {
61
- padding-block-start: var(--ams-grid-padding-block-lg);
63
+ padding-block-start: var(--ams-grid-padding-block-l);
62
64
  }
63
65
 
64
66
  @mixin ams-grid--padding-vertical--small {
65
- padding-block: var(--ams-grid-padding-block-sm);
67
+ padding-block: var(--ams-grid-padding-block-s);
66
68
  }
67
69
 
68
70
  @mixin ams-grid--padding-vertical--medium {
69
- padding-block: var(--ams-grid-padding-block-md);
71
+ padding-block: var(--ams-grid-padding-block-m);
70
72
  }
71
73
 
72
74
  @mixin ams-grid--padding-vertical--large {
73
- padding-block: var(--ams-grid-padding-block-lg);
75
+ padding-block: var(--ams-grid-padding-block-l);
74
76
  }
75
77
 
76
78
  @mixin ams-grid__cell--span-all {
@@ -18,6 +18,7 @@ Includes the name of the application if it is not the general website.
18
18
  - On narrow windows, links can move from the inline menu to the collapsible one.
19
19
  - Labels should be short to help the inline menu fit on a single line whenever possible.
20
20
  - An icon can be added to the end of a link to make its destination easier to guess.
21
+ - For websites with a brand name that feature the standard Amsterdam logo, only the emblem is shown on narrow screens.
21
22
 
22
23
  ## References
23
24
 
@@ -8,34 +8,46 @@
8
8
 
9
9
  .ams-header {
10
10
  /*
11
- * The branding section is created twice: once outside the navigation and once hidden inside it.
12
- * This keeps all navigation in one nav element and lets the menu wrap around the branding section.
13
- * Display grid is used to let both branding sections overlap.
11
+ * The logo link section is created twice: once outside the navigation and once hidden inside it.
12
+ * This keeps all navigation in one nav element and lets the menu wrap around the logo link section.
13
+ * Display grid is used to let both logo link sections overlap.
14
14
  */
15
15
  display: grid;
16
+ font-family: var(--ams-header-font-family);
16
17
  padding-block: var(--ams-header-padding-block);
17
18
  padding-inline: var(--ams-header-padding-inline);
18
19
  }
19
20
 
20
- .ams-header__branding {
21
+ .ams-header__logo-link {
21
22
  align-items: center;
22
- align-self: start; // To align the branding section to the top of the header when it wraps
23
- column-gap: var(--ams-header-branding-column-gap);
23
+ align-self: start; // To align the logo link section to the top of the header when it wraps
24
+ column-gap: var(--ams-header-logo-link-column-gap);
24
25
  display: flex;
25
- grid-area: 1 / 1; // To allow this section to overlap with the second branding section
26
+ grid-area: 1 / 1; // To allow this section to overlap with the second logo link section
27
+ inline-size: fit-content;
28
+ outline-offset: var(--ams-header-logo-link-outline-offset);
29
+ text-decoration: none;
26
30
  }
27
31
 
28
- .ams-header__branding--hidden {
32
+ .ams-header__logo-link--hidden {
29
33
  opacity: 0%;
30
- user-select: none; // The hidden branding section should not be selectable
34
+ user-select: none; // The hidden logo link section should not be selectable
31
35
  }
32
36
 
33
- .ams-header__logo-link {
34
- outline-offset: var(--ams-header-logo-link-outline-offset);
37
+ .ams-header__logo-container {
38
+ flex-shrink: 0;
39
+ inline-size: 0.75rem;
40
+ overflow: hidden;
41
+
42
+ @media screen and (min-width: $ams-breakpoint-medium) {
43
+ inline-size: auto;
44
+ }
35
45
  }
36
46
 
37
- /* TODO Remove after updating Heading line heights in DES-973. */
38
- .ams-heading.ams-header__brand-name {
47
+ .ams-header__brand-name {
48
+ color: var(--ams-header-brand-name-color);
49
+ font-size: var(--ams-header-brand-name-font-size);
50
+ font-weight: var(--ams-header-brand-name-font-weight);
39
51
  line-height: 1.35;
40
52
  }
41
53
 
@@ -43,8 +55,8 @@
43
55
  column-gap: var(--ams-header-navigation-column-gap);
44
56
  display: flex;
45
57
  flex-wrap: wrap;
46
- grid-area: 1 / 1; // To allow this section to overlap with the branding section
47
- // This section blocks pointer events initially, so the hidden branding section can't be activated.
58
+ grid-area: 1 / 1; // To allow this section to overlap with the logo link section
59
+ // This section blocks pointer events initially, so the hidden logo link section can't be activated.
48
60
  // The menu and collapsible menu set it back to auto, to make sure they can be activated.
49
61
  pointer-events: none;
50
62
  row-gap: var(--ams-header-navigation-row-gap);
@@ -83,7 +95,6 @@
83
95
 
84
96
  @mixin header-menu-action {
85
97
  color: var(--ams-header-menu-item-color);
86
- font-family: var(--ams-header-menu-item-font-family);
87
98
  font-size: var(--ams-header-menu-item-font-size);
88
99
  font-weight: var(--ams-header-menu-item-font-weight);
89
100
  line-height: var(--ams-header-menu-item-line-height);
@@ -120,7 +131,7 @@
120
131
 
121
132
  @mixin reset-button {
122
133
  background: none;
123
- border: 0;
134
+ border: none;
124
135
  margin-block: 0; // [1]
125
136
  margin-inline: 0; // [1]
126
137
  padding-inline: 0;
@@ -130,8 +141,9 @@
130
141
 
131
142
  .ams-header__mega-menu-button {
132
143
  column-gap: var(--ams-header-menu-item-column-gap);
133
- cursor: pointer;
144
+ cursor: var(--ams-header-mega-menu-button-cursor);
134
145
  display: grid;
146
+ font-family: inherit;
135
147
  grid-auto-flow: column;
136
148
 
137
149
  @include header-menu-action;
@@ -2,16 +2,16 @@
2
2
 
3
3
  # Heading
4
4
 
5
- Describes the content that follows it.
6
- Use Headings to allow the user to grasp the structure of the page quickly.
5
+ Introduces a page section and describes the following content.
7
6
 
8
7
  ## Guidelines
9
8
 
10
- - A heading describes the content beneath it.
11
- - Every page should contain one Heading with level 1.
12
- - Do not skip heading levels, e.g. a level 2 Heading should be followed by one with level 3, not level 4.
13
- - Do not use a Heading for formatting and styling, but to represent the page’s structure.
14
- Users of screen readers use headings to navigate the page an incorrect hierarchy can confuse them.
9
+ - Use Headings to allow the user to quickly grasp the structure of the page.
10
+ - All headings together represent the document’s structure. Users of screen readers may use headings to navigate the page an incorrect hierarchy will confuse them.
11
+ - Every page should contain one heading with level 1.
12
+ Do not skip heading levels, e.g. a level 2 Heading should be followed by one with level 3, not level 4.
13
+ The `level` prop doesn’t have a default value; the correct level should be determined for each instance.
14
+ - Don’t use a Heading just for its visual appearance.
15
15
 
16
16
  ## Relevant WCAG requirements
17
17
 
@@ -23,36 +23,36 @@
23
23
  @include reset-hx;
24
24
  }
25
25
 
26
- .ams-heading--level-1 {
27
- font-size: var(--ams-heading-level-1-font-size);
28
- line-height: var(--ams-heading-level-1-line-height);
26
+ .ams-heading--1 {
27
+ font-size: var(--ams-heading-1-font-size);
28
+ line-height: var(--ams-heading-1-line-height);
29
29
  }
30
30
 
31
- .ams-heading--level-2 {
32
- font-size: var(--ams-heading-level-2-font-size);
33
- line-height: var(--ams-heading-level-2-line-height);
31
+ .ams-heading--2 {
32
+ font-size: var(--ams-heading-2-font-size);
33
+ line-height: var(--ams-heading-2-line-height);
34
34
  }
35
35
 
36
- .ams-heading--level-3 {
37
- font-size: var(--ams-heading-level-3-font-size);
38
- line-height: var(--ams-heading-level-3-line-height);
36
+ .ams-heading--3 {
37
+ font-size: var(--ams-heading-3-font-size);
38
+ line-height: var(--ams-heading-3-line-height);
39
39
  }
40
40
 
41
- .ams-heading--level-4 {
42
- font-size: var(--ams-heading-level-4-font-size);
43
- line-height: var(--ams-heading-level-4-line-height);
41
+ .ams-heading--4 {
42
+ font-size: var(--ams-heading-4-font-size);
43
+ line-height: var(--ams-heading-4-line-height);
44
44
  }
45
45
 
46
- .ams-heading--level-5 {
47
- font-size: var(--ams-heading-level-5-font-size);
48
- line-height: var(--ams-heading-level-5-line-height);
46
+ .ams-heading--5 {
47
+ font-size: var(--ams-heading-5-font-size);
48
+ line-height: var(--ams-heading-5-line-height);
49
49
  }
50
50
 
51
- .ams-heading--level-6 {
52
- font-size: var(--ams-heading-level-6-font-size);
53
- line-height: var(--ams-heading-level-6-line-height);
51
+ .ams-heading--6 {
52
+ font-size: var(--ams-heading-6-font-size);
53
+ line-height: var(--ams-heading-6-line-height);
54
54
  }
55
55
 
56
- .ams-heading--inverse-color {
56
+ .ams-heading--inverse {
57
57
  color: var(--ams-heading-inverse-color);
58
58
  }
@@ -12,10 +12,10 @@ Use an icon to support textual interactive elements like buttons and links.
12
12
  Always try to provide accompanying text for an icon.
13
13
  Only use icons without accompanying text if they adhere to international standards, such as menu (hamburger icon), search (magnifying glass), next, previous, play, pause, etc.
14
14
 
15
- ## Color
15
+ ## Colour
16
16
 
17
17
  Icons are black or white.
18
- When used as part of an interactive element, they are dark blue.
18
+ When used as part of an interactive element, they are blue.
19
19
  When disabled, they are grey.
20
20
  They must adhere to the same contrast ratio for accessibility as typography against a background colour.
21
21
  The icon defaults to the colour of the container it is in.
@@ -26,9 +26,9 @@ Icons are aligned to the left of the text by default and vertically centred to t
26
26
 
27
27
  ## Size
28
28
 
29
- Icons use the same text levels as all typographic components to determine their size.
30
- This ensures easy alignment between icons and text.
31
- [Refer to the typography documentation for more information](/docs/brand-design-tokens-text--docs).
29
+ Icons have extra whitespace at their top and bottom to match the line height of text components.
30
+ Specify the appropriate size to pair an icon with small or large body text or with a heading.
31
+ [Read more in the typography documentation](/docs/brand-design-tokens-typography--docs).
32
32
 
33
33
  ## Overview
34
34
 
@@ -4,55 +4,68 @@
4
4
  */
5
5
 
6
6
  .ams-icon {
7
- align-items: center;
8
- display: inline-flex;
9
- }
7
+ --ams-line-height: var(--ams-icon-line-height);
8
+
9
+ align-self: baseline; // Aligns the icon with text in flex or grid context
10
+ display: inline-flex; // Stretches the svg in order to align the icon vertically
11
+ font-size: var(--ams-icon-font-size);
12
+ line-height: var(--ams-line-height);
13
+
14
+ &::after {
15
+ content: "\00200B"; // This zero width space enables baseline alignment.
16
+ }
10
17
 
11
- .ams-icon svg {
12
- fill: currentColor;
18
+ svg {
19
+ fill: currentColor;
20
+ inline-size: 1em;
21
+ }
13
22
  }
14
23
 
15
- .ams-icon--inverse-color {
24
+ .ams-icon--inverse {
16
25
  color: var(--ams-icon-inverse-color);
17
26
  }
18
27
 
19
28
  .ams-icon--square {
20
- aspect-ratio: 1 / 1;
29
+ inline-size: calc(1em * var(--ams-line-height));
21
30
  justify-content: center;
22
31
  }
23
32
 
24
- .ams-icon--size-3 {
25
- block-size: calc(var(--ams-icon-size-3-font-size) * var(--ams-icon-size-3-line-height));
26
- }
33
+ .ams-icon--small {
34
+ --ams-line-height: var(--ams-icon-small-line-height);
27
35
 
28
- .ams-icon--size-3 svg {
29
- block-size: var(--ams-icon-size-3-font-size);
30
- inline-size: var(--ams-icon-size-3-font-size);
36
+ font-size: var(--ams-icon-small-font-size);
31
37
  }
32
38
 
33
- .ams-icon--size-4 {
34
- block-size: calc(var(--ams-icon-size-4-font-size) * var(--ams-icon-size-4-line-height));
35
- }
39
+ .ams-icon--large {
40
+ --ams-line-height: var(--ams-icon-large-line-height);
36
41
 
37
- .ams-icon--size-4 svg {
38
- block-size: var(--ams-icon-size-4-font-size);
39
- inline-size: var(--ams-icon-size-4-font-size);
42
+ font-size: var(--ams-icon-large-font-size);
40
43
  }
41
44
 
42
- .ams-icon--size-5 {
43
- block-size: calc(var(--ams-icon-size-5-font-size) * var(--ams-icon-size-5-line-height));
45
+ .ams-icon--heading-3 {
46
+ --ams-line-height: var(--ams-icon-heading-3-line-height);
47
+
48
+ font-size: var(--ams-icon-heading-3-font-size);
49
+ line-height: var(--ams-icon-heading-3-line-height);
44
50
  }
45
51
 
46
- .ams-icon--size-5 svg {
47
- block-size: var(--ams-icon-size-5-font-size);
48
- inline-size: var(--ams-icon-size-5-font-size);
52
+ .ams-icon--heading-4 {
53
+ --ams-line-height: var(--ams-icon-heading-4-line-height);
54
+
55
+ font-size: var(--ams-icon-heading-4-font-size);
56
+ line-height: var(--ams-icon-heading-4-line-height);
49
57
  }
50
58
 
51
- .ams-icon--size-6 {
52
- block-size: calc(var(--ams-icon-size-6-font-size) * var(--ams-icon-size-6-line-height));
59
+ .ams-icon--heading-5 {
60
+ --ams-line-height: var(--ams-icon-heading-5-line-height);
61
+
62
+ font-size: var(--ams-icon-heading-5-font-size);
63
+ line-height: var(--ams-icon-heading-5-line-height);
53
64
  }
54
65
 
55
- .ams-icon--size-6 svg {
56
- block-size: var(--ams-icon-size-6-font-size);
57
- inline-size: var(--ams-icon-size-6-font-size);
66
+ .ams-icon--heading-6 {
67
+ --ams-line-height: var(--ams-icon-heading-6-line-height);
68
+
69
+ font-size: var(--ams-icon-heading-6-font-size);
70
+ line-height: var(--ams-icon-heading-6-line-height);
58
71
  }
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  @mixin reset-button {
7
- border: 0;
7
+ border: none;
8
8
  margin-block: 0; // [1]
9
9
  margin-inline: 0; // [1]
10
10
  padding-block: 0;
@@ -16,7 +16,8 @@
16
16
  .ams-icon-button {
17
17
  background-color: transparent;
18
18
  color: var(--ams-icon-button-color);
19
- cursor: pointer;
19
+ cursor: var(--ams-icon-button-cursor);
20
+ display: inline-flex;
20
21
  outline-offset: var(--ams-icon-button-outline-offset);
21
22
  touch-action: manipulation;
22
23
 
@@ -30,35 +31,35 @@
30
31
  &:disabled {
31
32
  background-color: transparent;
32
33
  color: var(--ams-icon-button-disabled-color);
33
- cursor: not-allowed;
34
+ cursor: var(--ams-icon-button-disabled-cursor);
34
35
  }
35
36
  }
36
37
 
37
- .ams-icon-button--contrast-color {
38
- color: var(--ams-icon-button-contrast-color-color);
38
+ .ams-icon-button--contrast {
39
+ color: var(--ams-icon-button-contrast-color);
39
40
 
40
41
  &:hover {
41
- background-color: var(--ams-icon-button-contrast-color-hover-background-color);
42
- color: var(--ams-icon-button-contrast-color-hover-color);
42
+ background-color: var(--ams-icon-button-contrast-hover-background-color);
43
+ color: var(--ams-icon-button-contrast-hover-color);
43
44
  }
44
45
 
45
46
  &:disabled {
46
47
  background-color: transparent;
47
- color: var(--ams-icon-button-contrast-color-disabled-color);
48
+ color: var(--ams-icon-button-contrast-disabled-color);
48
49
  }
49
50
  }
50
51
 
51
- .ams-icon-button--inverse-color {
52
- background-color: var(--ams-icon-button-inverse-color-background-color);
53
- color: var(--ams-icon-button-inverse-color-color);
52
+ .ams-icon-button--inverse {
53
+ background-color: var(--ams-icon-button-inverse-background-color);
54
+ color: var(--ams-icon-button-inverse-color);
54
55
 
55
56
  &:hover {
56
- background-color: var(--ams-icon-button-inverse-color-hover-background-color);
57
- color: var(--ams-icon-button-inverse-color-hover-color);
57
+ background-color: var(--ams-icon-button-inverse-hover-background-color);
58
+ color: var(--ams-icon-button-inverse-hover-color);
58
59
  }
59
60
 
60
61
  &:disabled {
61
- background-color: var(--ams-icon-button-inverse-color-disabled-background-color);
62
- color: var(--ams-icon-button-inverse-color-disabled-color);
62
+ background-color: var(--ams-icon-button-inverse-disabled-background-color);
63
+ color: var(--ams-icon-button-inverse-disabled-color);
63
64
  }
64
65
  }