@amsterdam/design-system-css 0.14.1 → 0.16.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 (223) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +3 -1
  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/gap/gap.css +1 -1
  48. package/dist/gap/gap.css.map +1 -1
  49. package/dist/grid/grid.css +1 -1
  50. package/dist/grid/grid.css.map +1 -1
  51. package/dist/heading/heading.css +1 -1
  52. package/dist/heading/heading.css.map +1 -1
  53. package/dist/icon/icon.css +1 -1
  54. package/dist/icon/icon.css.map +1 -1
  55. package/dist/icon-button/icon-button.css +1 -1
  56. package/dist/icon-button/icon-button.css.map +1 -1
  57. package/dist/image-slider/image-slider.css +1 -1
  58. package/dist/image-slider/image-slider.css.map +1 -1
  59. package/dist/index.css +1 -1
  60. package/dist/index.css.map +1 -1
  61. package/dist/invalid-form-alert/invalid-form-alert.css +1 -0
  62. package/dist/invalid-form-alert/invalid-form-alert.css.map +1 -0
  63. package/dist/label/label.css +1 -1
  64. package/dist/label/label.css.map +1 -1
  65. package/dist/link/link.css +1 -1
  66. package/dist/link/link.css.map +1 -1
  67. package/dist/link-list/link-list.css +1 -1
  68. package/dist/link-list/link-list.css.map +1 -1
  69. package/dist/margin/margin.css +1 -1
  70. package/dist/margin/margin.css.map +1 -1
  71. package/dist/ordered-list/ordered-list.css +1 -1
  72. package/dist/ordered-list/ordered-list.css.map +1 -1
  73. package/dist/page/page.css +1 -0
  74. package/dist/page/page.css.map +1 -0
  75. package/dist/page-footer/page-footer.css +1 -0
  76. package/dist/page-footer/page-footer.css.map +1 -0
  77. package/dist/page-header/page-header.css +1 -0
  78. package/dist/page-header/page-header.css.map +1 -0
  79. package/dist/page-heading/page-heading.css +1 -1
  80. package/dist/page-heading/page-heading.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/standalone-link/standalone-link.css +1 -0
  98. package/dist/standalone-link/standalone-link.css.map +1 -0
  99. package/dist/switch/switch.css +1 -1
  100. package/dist/switch/switch.css.map +1 -1
  101. package/dist/table-of-contents/table-of-contents.css +1 -1
  102. package/dist/table-of-contents/table-of-contents.css.map +1 -1
  103. package/dist/tabs/tabs.css +1 -1
  104. package/dist/tabs/tabs.css.map +1 -1
  105. package/dist/text-area/text-area.css +1 -1
  106. package/dist/text-area/text-area.css.map +1 -1
  107. package/dist/text-input/text-input.css +1 -1
  108. package/dist/text-input/text-input.css.map +1 -1
  109. package/dist/time-input/time-input.css +1 -1
  110. package/dist/time-input/time-input.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/dist/visually-hidden/visually-hidden.css +1 -1
  114. package/dist/visually-hidden/visually-hidden.css.map +1 -1
  115. package/package.json +4 -4
  116. package/src/common/hyphenation.scss +3 -3
  117. package/src/components/accordion/accordion.scss +6 -6
  118. package/src/components/action-group/README.md +1 -1
  119. package/src/components/action-group/action-group.scss +1 -1
  120. package/src/components/alert/README.md +13 -15
  121. package/src/components/alert/alert.scss +29 -14
  122. package/src/components/aspect-ratio/README.md +8 -8
  123. package/src/components/aspect-ratio/aspect-ratio.scss +6 -3
  124. package/src/components/avatar/README.md +5 -4
  125. package/src/components/avatar/avatar.scss +8 -46
  126. package/src/components/badge/README.md +7 -6
  127. package/src/components/badge/badge.scss +13 -40
  128. package/src/components/blockquote/blockquote.scss +1 -1
  129. package/src/components/breadcrumb/breadcrumb.scss +2 -0
  130. package/src/components/breakout/breakout.scss +23 -23
  131. package/src/components/button/README.md +1 -1
  132. package/src/components/button/button.scss +4 -1
  133. package/src/components/card/README.md +15 -14
  134. package/src/components/card/card.scss +24 -19
  135. package/src/components/character-count/character-count.scss +2 -0
  136. package/src/components/checkbox/checkbox.scss +6 -7
  137. package/src/components/column/column.scss +9 -8
  138. package/src/components/date-input/date-input.scss +3 -4
  139. package/src/components/description-list/description-list.scss +12 -10
  140. package/src/components/dialog/README.md +3 -5
  141. package/src/components/dialog/dialog.scss +38 -5
  142. package/src/components/error-message/error-message.scss +2 -0
  143. package/src/components/field-set/field-set.scss +8 -7
  144. package/src/components/figure/figure.scss +3 -1
  145. package/src/components/file-input/file-input.scss +2 -2
  146. package/src/components/file-list/file-list.scss +2 -1
  147. package/src/components/gap/README.md +13 -9
  148. package/src/components/gap/gap.scss +8 -12
  149. package/src/components/grid/README.md +9 -8
  150. package/src/components/grid/_mixins.scss +27 -25
  151. package/src/components/grid/grid.scss +19 -19
  152. package/src/components/heading/README.md +7 -7
  153. package/src/components/heading/heading.scss +20 -19
  154. package/src/components/icon/README.md +5 -5
  155. package/src/components/icon/icon.scss +41 -27
  156. package/src/components/icon-button/icon-button.scss +16 -15
  157. package/src/components/image-slider/README.md +1 -1
  158. package/src/components/image-slider/image-slider.scss +11 -3
  159. package/src/components/index.scss +5 -7
  160. package/src/components/{form-error-list → invalid-form-alert}/README.md +9 -9
  161. package/src/components/{form-error-list/form-error-list.scss → invalid-form-alert/invalid-form-alert.scss} +4 -4
  162. package/src/components/label/label.scss +1 -0
  163. package/src/components/link/README.md +9 -11
  164. package/src/components/link/link.scss +13 -46
  165. package/src/components/link-list/link-list.scss +7 -8
  166. package/src/components/logo/README.md +1 -1
  167. package/src/components/margin/README.md +16 -10
  168. package/src/components/margin/margin.scss +6 -8
  169. package/src/components/ordered-list/ordered-list.scss +3 -1
  170. package/src/components/page/README.md +23 -0
  171. package/src/components/page/page.scss +12 -0
  172. package/src/components/{footer → page-footer}/README.md +7 -4
  173. package/src/components/page-footer/page-footer.scss +56 -0
  174. package/src/components/{header → page-header}/README.md +6 -5
  175. package/src/components/page-header/page-header.scss +237 -0
  176. package/src/components/page-heading/README.md +1 -1
  177. package/src/components/page-heading/page-heading.scss +2 -1
  178. package/src/components/pagination/pagination.scss +23 -34
  179. package/src/components/paragraph/paragraph.scss +3 -1
  180. package/src/components/password-input/password-input.scss +2 -3
  181. package/src/components/radio/radio.scss +4 -5
  182. package/src/components/row/row.scss +9 -9
  183. package/src/components/search-field/search-field.scss +2 -3
  184. package/src/components/select/select.scss +2 -2
  185. package/src/components/skip-link/README.md +3 -3
  186. package/src/components/spotlight/README.md +5 -3
  187. package/src/components/spotlight/spotlight.scss +6 -10
  188. package/src/components/standalone-link/README.md +11 -0
  189. package/src/components/standalone-link/standalone-link.scss +53 -0
  190. package/src/components/switch/switch.scss +2 -2
  191. package/src/components/table-of-contents/table-of-contents.scss +2 -0
  192. package/src/components/tabs/README.md +1 -1
  193. package/src/components/tabs/tabs.scss +6 -3
  194. package/src/components/text-area/text-area.scss +1 -2
  195. package/src/components/text-input/text-input.scss +2 -3
  196. package/src/components/time-input/time-input.scss +3 -4
  197. package/src/components/unordered-list/unordered-list.scss +3 -1
  198. package/src/components/visually-hidden/visually-hidden.scss +1 -0
  199. package/dist/footer/footer.css +0 -1
  200. package/dist/footer/footer.css.map +0 -1
  201. package/dist/form-error-list/form-error-list.css +0 -1
  202. package/dist/form-error-list/form-error-list.css.map +0 -1
  203. package/dist/header/header.css +0 -1
  204. package/dist/header/header.css.map +0 -1
  205. package/dist/mega-menu/mega-menu.css +0 -1
  206. package/dist/mega-menu/mega-menu.css.map +0 -1
  207. package/dist/page-menu/page-menu.css +0 -1
  208. package/dist/page-menu/page-menu.css.map +0 -1
  209. package/dist/screen/screen.css +0 -1
  210. package/dist/screen/screen.css.map +0 -1
  211. package/dist/top-task-link/top-task-link.css +0 -1
  212. package/dist/top-task-link/top-task-link.css.map +0 -1
  213. package/src/common/size.scss +0 -14
  214. package/src/components/footer/footer.scss +0 -8
  215. package/src/components/header/header.scss +0 -216
  216. package/src/components/mega-menu/README.md +0 -3
  217. package/src/components/mega-menu/mega-menu.scss +0 -16
  218. package/src/components/page-menu/README.md +0 -24
  219. package/src/components/page-menu/page-menu.scss +0 -67
  220. package/src/components/screen/README.md +0 -23
  221. package/src/components/screen/screen.scss +0 -23
  222. package/src/components/top-task-link/README.md +0 -27
  223. package/src/components/top-task-link/top-task-link.scss +0 -45
@@ -17,6 +17,7 @@
17
17
  display: grid;
18
18
  gap: var(--ams-link-list-gap);
19
19
 
20
+ @include hyphenation;
20
21
  @include text-rendering;
21
22
  @include reset-ul;
22
23
  }
@@ -49,22 +50,20 @@
49
50
  .ams-link-list__link--large {
50
51
  font-size: var(--ams-link-list-link-large-font-size);
51
52
  line-height: var(--ams-link-list-link-large-line-height);
52
-
53
- @include hyphenation;
54
53
  }
55
54
 
56
- .ams-link-list__link--contrast-color {
57
- color: var(--ams-link-list-link-contrast-color-color);
55
+ .ams-link-list__link--contrast {
56
+ color: var(--ams-link-list-link-contrast-color);
58
57
 
59
58
  &:hover {
60
- color: var(--ams-link-list-link-contrast-color-hover-color);
59
+ color: var(--ams-link-list-link-contrast-hover-color);
61
60
  }
62
61
  }
63
62
 
64
- .ams-link-list__link--inverse-color {
65
- color: var(--ams-link-list-link-inverse-color-color);
63
+ .ams-link-list__link--inverse {
64
+ color: var(--ams-link-list-link-inverse-color);
66
65
 
67
66
  &:hover {
68
- color: var(--ams-link-list-link-inverse-color-hover-color);
67
+ color: var(--ams-link-list-link-inverse-hover-color);
69
68
  }
70
69
  }
@@ -30,7 +30,7 @@ The sub-brands are:
30
30
  ## Requirements for all logos
31
31
 
32
32
  - The logo is always displayed.
33
- - The logo is left-aligned in the header.
33
+ - The logo is left-aligned in the Page Header.
34
34
  - The logo links to the homepage of the website or application.
35
35
  - If the application is a form, application, or tool without a homepage, the logo links to the page where the form, application, or tool is referred to.
36
36
 
@@ -6,20 +6,26 @@ Adds white space below a single element.
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 height of the bottom margin.
9
+ Six options are available for the width or height of the bottom margin:
10
10
 
11
- | Class name | Example |
12
- | ------------ | -------------------------------------------------------------------------------------------- |
13
- | `ams-mb--xs` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-xs);" /> |
14
- | `ams-mb--sm` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-sm);" /> |
15
- | `ams-mb--md` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-md);" /> |
16
- | `ams-mb--lg` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-lg);" /> |
17
- | `ams-mb--xl` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-xl);" /> |
11
+ - `ams-mb-xs`
12
+ - `ams-mb-s`
13
+ - `ams-mb-m`
14
+ - `ams-mb-l`
15
+ - `ams-mb-xl`
16
+ - `ams-mb-2xl`
17
+
18
+ Because spacing is responsive, the margins are as well.
19
+ They are also smaller in Compact Mode.
20
+ Consult the [Space](/docs/brand-design-tokens-space--docs) docs for an indication of their sizes.
18
21
 
19
22
  ## Guidelines
20
23
 
21
24
  - Use this utility class to vertically separate one element from the next.
22
- - It can be used on any element and sets the `margin-block-end` CSS property. This declaration is marked with the `!important` flag to ensure it overrides any other margins.
23
- - Elements’ top and bottom margins are sometimes collapsed into a single margin. Consult [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_box_model/Mastering_margin_collapsing) for details.
25
+ - It can be used on any element and sets the `margin-block-end` CSS property.
26
+ This declaration is marked with the `!important` flag to ensure it overrides any other margins.
27
+ - Elements’ top and bottom margins are sometimes collapsed into a single margin.
28
+ We only offer a utility for the bottom margin to prevent issues arising from this.
29
+ Consult [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_box_model/Mastering_margin_collapsing) for details.
24
30
  - To add equal margins between elements, either use the [Gap](/docs/utilities-css-gap--docs) utility class on their common parent or wrap them in a [Column](/docs/components-layout-column--docs) component.
25
31
  This helps in loops: it prevents having to treat the last element differently.
@@ -3,13 +3,11 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- @use "sass:map";
7
- @use "../../common/size" as *;
8
-
9
- @each $size in map.keys($ams-sizes) {
10
- @if $size != "no" {
11
- .ams-mb--#{$size} {
12
- margin-block-end: var(--ams-margin-#{$size}) !important;
13
- }
6
+ // If you modify this list, you must also update the object in
7
+ // packages/react/src/common/shortSize.ts
8
+ @each $size in ("xs", "s", "m", "l", "xl", "2xl") {
9
+ .ams-mb-#{$size} {
10
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
11
+ margin-block-end: var(--ams-space-#{$size}) !important;
14
12
  }
15
13
  }
@@ -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-ol {
@@ -17,6 +18,7 @@
17
18
  gap: var(--ams-ordered-list-gap);
18
19
 
19
20
  @include text-rendering;
21
+ @include hyphenation;
20
22
  @include reset-ol;
21
23
  }
22
24
 
@@ -34,7 +36,7 @@
34
36
  }
35
37
  }
36
38
 
37
- .ams-ordered-list--inverse-color:not(.ams-ordered-list--no-markers) {
39
+ .ams-ordered-list--inverse:not(.ams-ordered-list--no-markers) {
38
40
  color: var(--ams-ordered-list-inverse-color);
39
41
  }
40
42
 
@@ -0,0 +1,23 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Page
4
+
5
+ Contains the entire website.
6
+ Sets the background colour and its maximum width, and is horizontally centered.
7
+
8
+ ## Guidelines
9
+
10
+ - The Page component must be used on all websites for the City of Amsterdam.
11
+ Applications can use it as well, although a specific layout for them is in development.
12
+ - It is the outermost container. Within it, combine components such as
13
+ [Grid](https://designsystem.amsterdam/?path=/docs/components-layout-grid--docs),
14
+ [Page Header](https://designsystem.amsterdam/?path=/docs/components-containers-page-header--docs),
15
+ [Page Footer](https://designsystem.amsterdam/?path=/docs/components-containers-page-footer--docs),
16
+ [Spotlight](https://designsystem.amsterdam/?path=/docs/components-containers-spotlight--docs),
17
+ [Image Slider](https://designsystem.amsterdam/?path=/docs/components-media-image-slider--docs),
18
+ and [Figure](https://designsystem.amsterdam/?path=/docs/components-media-figure--docs).
19
+
20
+ ## Design
21
+
22
+ The Page container sets the maximum width for a website of the City of Amsterdam, which is 1600 pixels.
23
+ It horizontally centres both itself and its content and sets a white background.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ .ams-page {
7
+ background-color: var(--ams-page-background-color);
8
+ margin-inline: auto;
9
+ max-inline-size: var(--ams-page-max-inline-size);
10
+ min-block-size: 100vh; /* Fallback for browsers that do not support dvh */
11
+ min-block-size: 100dvh;
12
+ }
@@ -1,15 +1,18 @@
1
1
  <!-- @license CC0-1.0 -->
2
2
 
3
- # Footer
3
+ # Page Footer
4
4
 
5
5
  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.
11
- - The Footer must be used on all websites for the City of Amsterdam.
9
+ - The Page Footer must be used on all websites and applications for the City of Amsterdam.
10
+ - It usually consists of two sections: a full-width blue `PageFooter.Spotlight` and a `PageFooter.Menu` below it.
11
+ - `Footer.Menu` is preceded by a visually hidden `Heading` for accessibility.
12
+ - A Page Footer containing only a `PageFooter.Menu` can be sufficient for applications.
13
+ - The Page Footer must be used on all websites for the City of Amsterdam.
12
14
  - It must be the same on every page.
15
+ - Set [the inverse colour](?path=/docs/brand-design-tokens-colour--docs#pairing-foreground-with-background-colours) on all text and links in this area.
13
16
 
14
17
  The top section offers space for various practical links:
15
18
 
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @use "../../common/breakpoint" as *;
7
+ @use "../../common/hyphenation" as *;
8
+ @use "../../common/text-rendering" as *;
9
+
10
+ @mixin reset-ul {
11
+ list-style: none;
12
+ margin-block: 0;
13
+ }
14
+
15
+ .ams-page-footer__spotlight {
16
+ background-color: var(--ams-page-footer-spotlight-background-color);
17
+ }
18
+
19
+ .ams-page-footer__menu {
20
+ column-gap: var(--ams-page-footer-menu-column-gap);
21
+ display: flex;
22
+ flex-wrap: wrap;
23
+ padding-block: var(--ams-page-footer-menu-padding-block);
24
+ padding-inline: var(--ams-page-footer-menu-padding-inline);
25
+ row-gap: var(--ams-page-footer-menu-row-gap);
26
+
27
+ @include reset-ul;
28
+
29
+ @media screen and (min-width: $ams-breakpoint-medium) {
30
+ padding-inline: var(--ams-page-footer-menu-medium-padding-inline);
31
+ }
32
+
33
+ @media screen and (min-width: $ams-breakpoint-wide) {
34
+ padding-inline: var(--ams-page-footer-menu-wide-padding-inline);
35
+ }
36
+ }
37
+
38
+ .ams-page-footer__menu-link {
39
+ color: var(--ams-page-footer-menu-link-color);
40
+ font-family: var(--ams-page-footer-menu-link-font-family);
41
+ font-size: var(--ams-page-footer-menu-link-font-size);
42
+ font-weight: var(--ams-page-footer-menu-link-font-weight);
43
+ line-height: var(--ams-page-footer-menu-link-line-height);
44
+ outline-offset: var(--ams-page-footer-menu-link-outline-offset);
45
+ text-decoration-line: var(--ams-page-footer-menu-link-text-decoration-line);
46
+ text-decoration-thickness: var(--ams-page-footer-menu-link-text-decoration-thickness);
47
+ text-underline-offset: var(--ams-page-footer-menu-link-text-underline-offset);
48
+
49
+ @include hyphenation;
50
+ @include text-rendering;
51
+
52
+ &:hover {
53
+ color: var(--ams-page-footer-menu-link-hover-color);
54
+ text-decoration-line: var(--ams-page-footer-menu-link-hover-text-decoration-line);
55
+ }
56
+ }
@@ -1,25 +1,26 @@
1
1
  <!-- @license CC0-1.0 -->
2
2
 
3
- # Header
3
+ # Page Header
4
4
 
5
5
  Displays the City’s logo at the top of every page, and optionally a navigation menu.
6
6
  Includes the name of the application if it is not the general website.
7
7
 
8
8
  ## Guidelines
9
9
 
10
- - The Header must be used on all websites and applications for the City of Amsterdam.
10
+ - The Page Header must be used on all websites and applications for the City of Amsterdam.
11
11
  - It includes the logo of the City or the organization, the site title (except for the general website), and a menu with links to commonly used pages.
12
- - The Header is important because it conveys our corporate identity and is the first thing people see.
12
+ - The Page Header is important because it conveys our corporate identity and is the first thing people see.
13
13
  Using it consistently helps users recognize and trust the website.
14
- - The Header is the same on every page of the application, although full-screen pages may hide it, e.g. a video or a map.
14
+ - The Page Header is the same on every page of the application, although full-screen pages may hide it, e.g. a video or a map.
15
15
  - The inline menu can contain a maximum of 5 items.
16
16
  The last two will often be ‘Search’ and ‘Menu’.
17
17
  - The 'Menu' button opens a collapsible menu, which has room for more links.
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
 
24
- - A Header is a [landmark](https://www.w3.org/TR/wai-aria-practices-1.1/#aria_landmark_roles) and can be used to group navigation elements.
25
+ - A Page Header is a [landmark](https://www.w3.org/TR/wai-aria-practices-1.1/#aria_landmark_roles) and can be used to group navigation elements.
25
26
  - [WCAG 3.2.3](https://wcag.com/designers/3-2-3-consistent-navigation/) Consistent Navigation: Navigation menus that appear on multiple pages are consistent.
@@ -0,0 +1,237 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @use "../../common/breakpoint" as *;
7
+ @use "../../common/text-rendering" as *;
8
+
9
+ .ams-page-header {
10
+ /*
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
+ */
15
+ display: grid;
16
+ font-family: var(--ams-page-header-font-family);
17
+ padding-block: var(--ams-page-header-padding-block);
18
+ padding-inline: var(--ams-page-header-padding-inline);
19
+
20
+ @media screen and (min-width: $ams-breakpoint-medium) {
21
+ padding-inline: var(--ams-page-header-medium-padding-inline);
22
+ }
23
+
24
+ @media screen and (min-width: $ams-breakpoint-wide) {
25
+ padding-inline: var(--ams-page-header-wide-padding-inline);
26
+ }
27
+ }
28
+
29
+ .ams-page-header__logo-link {
30
+ align-items: center;
31
+ align-self: start; // To align the logo link section to the top of the header when it wraps
32
+ column-gap: var(--ams-page-header-logo-link-column-gap);
33
+ display: flex;
34
+ grid-area: 1 / 1; // To allow this section to overlap with the second logo link section
35
+ inline-size: fit-content;
36
+ outline-offset: var(--ams-page-header-logo-link-outline-offset);
37
+ text-decoration: none;
38
+ }
39
+
40
+ .ams-page-header__logo-link--hidden {
41
+ opacity: 0%;
42
+ user-select: none; // The hidden logo link section should not be selectable
43
+ }
44
+
45
+ .ams-page-header__logo-container {
46
+ flex-shrink: 0;
47
+ inline-size: 0.75rem;
48
+ overflow: hidden;
49
+
50
+ @media screen and (min-width: $ams-breakpoint-medium) {
51
+ inline-size: auto;
52
+ }
53
+ }
54
+
55
+ .ams-page-header__brand-name {
56
+ color: var(--ams-page-header-brand-name-color);
57
+ font-size: var(--ams-page-header-brand-name-font-size);
58
+ font-weight: var(--ams-page-header-brand-name-font-weight);
59
+ line-height: 1.35;
60
+ text-wrap: var(--ams-page-header-brand-name-text-wrap);
61
+ }
62
+
63
+ .ams-page-header__navigation {
64
+ column-gap: var(--ams-page-header-navigation-column-gap);
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ grid-area: 1 / 1; // To allow this section to overlap with the logo link section
68
+ // This section blocks pointer events initially, so the hidden logo link section can't be activated.
69
+ // The menu and collapsible menu set it back to auto, to make sure they can be activated.
70
+ pointer-events: none;
71
+ row-gap: var(--ams-page-header-navigation-row-gap);
72
+ }
73
+
74
+ @mixin reset-list {
75
+ list-style: none;
76
+ margin-block: 0;
77
+ padding-inline-start: 0;
78
+ }
79
+
80
+ .ams-page-header__menu {
81
+ align-items: center;
82
+ column-gap: var(--ams-page-header-menu-column-gap);
83
+ display: flex;
84
+ flex-wrap: wrap;
85
+ justify-content: flex-end;
86
+ margin-inline-start: auto;
87
+ pointer-events: auto; // Set pointer events back to auto to allow the menu to be activated
88
+ row-gap: var(--ams-page-header-menu-row-gap);
89
+
90
+ @include reset-list;
91
+ }
92
+
93
+ // Do not show menu items below the wide breakpoint...
94
+ .ams-page-header__menu-item {
95
+ @media screen and (not (min-width: $ams-breakpoint-wide)) {
96
+ display: none;
97
+ }
98
+ }
99
+
100
+ // ...unless they're fixed.
101
+ .ams-page-header__menu-item--fixed {
102
+ display: revert;
103
+ }
104
+
105
+ @mixin page-header-menu-action {
106
+ color: var(--ams-page-header-menu-item-color);
107
+ font-size: var(--ams-page-header-menu-item-font-size);
108
+ font-weight: var(--ams-page-header-menu-item-font-weight);
109
+ line-height: var(--ams-page-header-menu-item-line-height);
110
+ outline-offset: var(--ams-page-header-menu-item-outline-offset);
111
+ padding-block: var(--ams-page-header-menu-item-padding-block);
112
+ touch-action: manipulation;
113
+ white-space: nowrap;
114
+
115
+ @include text-rendering;
116
+
117
+ &:hover {
118
+ color: var(--ams-page-header-menu-item-hover-color);
119
+ }
120
+ }
121
+
122
+ .ams-page-header__menu-link {
123
+ display: inline-block;
124
+ text-decoration-line: var(--ams-page-header-menu-link-text-decoration-line);
125
+ text-decoration-thickness: var(--ams-page-header-menu-link-text-decoration-thickness);
126
+ text-underline-offset: var(--ams-page-header-menu-link-text-underline-offset);
127
+
128
+ @include page-header-menu-action;
129
+
130
+ &:hover {
131
+ text-decoration-line: var(--ams-page-header-menu-link-hover-text-decoration-line);
132
+ }
133
+ }
134
+
135
+ .ams-page-header__mega-menu-button-item--hide-on-wide-window {
136
+ @media screen and (min-width: $ams-breakpoint-wide) {
137
+ display: none;
138
+ }
139
+ }
140
+
141
+ @mixin reset-button {
142
+ background: none;
143
+ border: none;
144
+ margin-block: 0; // [1]
145
+ margin-inline: 0; // [1]
146
+ padding-inline: 0;
147
+
148
+ // [1] Remove the margin in older Safari.
149
+ }
150
+
151
+ .ams-page-header__mega-menu-button {
152
+ column-gap: var(--ams-page-header-menu-item-column-gap);
153
+ cursor: var(--ams-page-header-mega-menu-button-cursor);
154
+ display: grid;
155
+ font-family: inherit;
156
+ grid-auto-flow: column;
157
+
158
+ @include page-header-menu-action;
159
+ @include reset-button;
160
+ }
161
+
162
+ .ams-page-header__mega-menu-button[aria-expanded="true"] {
163
+ font-weight: var(--ams-page-header-mega-menu-button-label-open-font-weight);
164
+ }
165
+
166
+ .ams-page-header__mega-menu-button-label,
167
+ .ams-page-header__mega-menu-button-hidden-label {
168
+ grid-area: 1 / 1; // To allow the label and the hidden label to overlap
169
+ }
170
+
171
+ // This hidden label is used to prevent a layout shift when the mega menu is opened
172
+ // and the button text becomes bold.
173
+ .ams-page-header__mega-menu-button-hidden-label {
174
+ font-weight: var(--ams-page-header-mega-menu-button-label-open-font-weight);
175
+ pointer-events: none;
176
+ user-select: none;
177
+ visibility: hidden;
178
+ }
179
+
180
+ .ams-page-header__menu-icon {
181
+ line {
182
+ stroke: currentColor;
183
+ stroke-width: 3px;
184
+ transform-origin: center;
185
+ transition:
186
+ translate 0.1s ease-in-out,
187
+ rotate 0.2s ease-in-out,
188
+ opacity 0.1s ease-in-out;
189
+
190
+ @media (prefers-reduced-motion) {
191
+ transition: none;
192
+ }
193
+ }
194
+
195
+ .ams-page-header__menu-icon-top {
196
+ translate: 0 -7px;
197
+ }
198
+
199
+ .ams-page-header__menu-icon-bottom {
200
+ translate: 0 7px;
201
+ }
202
+ }
203
+
204
+ .ams-page-header__menu-icon--open {
205
+ .ams-page-header__menu-icon-top {
206
+ rotate: 45deg;
207
+ translate: 0;
208
+ }
209
+ .ams-page-header__menu-icon-middle {
210
+ opacity: 0%;
211
+ }
212
+ .ams-page-header__menu-icon-bottom {
213
+ rotate: -45deg;
214
+ translate: 0;
215
+ }
216
+ }
217
+
218
+ .ams-page-header__mega-menu {
219
+ inline-size: 100%;
220
+ pointer-events: auto; // Set pointer events back to auto to allow the mega menu to be activated
221
+
222
+ // Remove inline padding from Grids that are used in the mega menu.
223
+ // The grid inline padding is set on the header element.
224
+ & .ams-grid {
225
+ padding-inline: 0;
226
+ }
227
+ }
228
+
229
+ .ams-page-header__mega-menu--closed.ams-page-header__mega-menu--closed {
230
+ display: none;
231
+ }
232
+
233
+ .ams-page-header__grid-cell-narrow-window-only {
234
+ @media screen and (min-width: $ams-breakpoint-wide) {
235
+ display: none;
236
+ }
237
+ }
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Page Heading
4
4
 
5
- The page heading component is a prominent text at the beginning of a page, immediately after the header.
5
+ The page heading component is a prominent text at the beginning of a page, immediately after the Page Header.
6
6
  Use this component for a name, title, or motto.
7
7
 
8
8
  ## Guidelines
@@ -19,12 +19,13 @@
19
19
  font-size: var(--ams-page-heading-font-size);
20
20
  font-weight: var(--ams-page-heading-font-weight);
21
21
  line-height: var(--ams-page-heading-line-height);
22
+ text-wrap: var(--ams-page-heading-text-wrap);
22
23
 
23
24
  @include hyphenation;
24
25
  @include text-rendering;
25
26
  @include reset-h1;
26
27
  }
27
28
 
28
- .ams-page-heading--inverse-color {
29
+ .ams-page-heading--inverse {
29
30
  color: var(--ams-page-heading-inverse-color);
30
31
  }
@@ -5,6 +5,16 @@
5
5
 
6
6
  @use "../../common/text-rendering" as *;
7
7
 
8
+ .ams-pagination {
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ font-family: var(--ams-pagination-font-family);
12
+ font-size: var(--ams-pagination-font-size);
13
+ font-weight: var(--ams-pagination-font-weight);
14
+ justify-content: center;
15
+ line-height: var(--ams-pagination-line-height);
16
+ }
17
+
8
18
  @mixin reset-ol {
9
19
  list-style-type: none;
10
20
  margin-block: 0;
@@ -12,48 +22,28 @@
12
22
  }
13
23
 
14
24
  .ams-pagination__list {
15
- color: var(--ams-pagination-color);
16
25
  display: flex;
17
26
  flex-wrap: wrap;
18
- font-family: var(--ams-pagination-font-family);
19
- font-size: var(--ams-pagination-font-size);
20
- font-weight: var(--ams-pagination-font-weight);
21
- justify-content: center;
22
- line-height: var(--ams-pagination-line-height);
23
27
 
24
28
  @include reset-ol;
25
29
  }
26
30
 
27
- @mixin reset-button {
28
- all: unset;
29
- outline: revert;
30
- }
31
-
32
- .ams-pagination__button {
33
- /* The reset is included at the top of the block here, if you set it
34
- at the bottom `all: unset` overrides the `gap` property. */
35
- @include reset-button;
36
-
37
- box-sizing: border-box;
38
- cursor: pointer;
39
- display: flex;
40
- gap: var(--ams-pagination-button-gap);
41
- outline-offset: var(--ams-pagination-button-outline-offset);
42
- padding-inline: var(--ams-pagination-button-padding-inline);
43
- text-decoration-line: var(--ams-pagination-button-text-decoration-line);
44
- text-decoration-thickness: var(--ams-pagination-button-text-decoration-thickness);
45
- text-underline-offset: var(--ams-pagination-button-text-underline-offset);
31
+ .ams-pagination__link {
32
+ color: var(--ams-pagination-link-color);
33
+ display: inline-flex;
34
+ gap: var(--ams-pagination-link-gap);
35
+ outline-offset: var(--ams-pagination-link-outline-offset);
36
+ padding-inline: var(--ams-pagination-link-padding-inline);
37
+ text-decoration-line: var(--ams-pagination-link-text-decoration-line);
38
+ text-decoration-thickness: var(--ams-pagination-link-text-decoration-thickness);
39
+ text-underline-offset: var(--ams-pagination-link-text-underline-offset);
46
40
  touch-action: manipulation;
47
41
 
48
42
  @include text-rendering;
49
43
 
50
- &:disabled {
51
- display: none;
52
- }
53
-
54
44
  &:hover {
55
- color: var(--ams-pagination-button-hover-color);
56
- text-decoration-line: var(--ams-pagination-button-hover-text-decoration-line);
45
+ color: var(--ams-pagination-link-hover-color);
46
+ text-decoration-line: var(--ams-pagination-link-hover-text-decoration-line);
57
47
  }
58
48
 
59
49
  // Override for icon size
@@ -63,9 +53,8 @@
63
53
  }
64
54
  }
65
55
 
66
- .ams-pagination__button--current {
67
- cursor: default;
68
- font-weight: var(--ams-pagination-button-current-font-weight);
56
+ .ams-pagination__link[aria-current="page"] {
57
+ font-weight: var(--ams-pagination-link-current-font-weight);
69
58
 
70
59
  &:hover {
71
60
  text-decoration: none;
@@ -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-p {
@@ -18,6 +19,7 @@
18
19
  line-height: var(--ams-paragraph-line-height);
19
20
 
20
21
  @include text-rendering;
22
+ @include hyphenation;
21
23
  @include reset-p;
22
24
  }
23
25
 
@@ -31,6 +33,6 @@
31
33
  line-height: var(--ams-paragraph-large-line-height);
32
34
  }
33
35
 
34
- .ams-paragraph--inverse-color {
36
+ .ams-paragraph--inverse {
35
37
  color: var(--ams-paragraph-inverse-color);
36
38
  }