@amsterdam/design-system-css 3.3.0 → 4.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.
Files changed (74) hide show
  1. package/AGENTS.md +46 -0
  2. package/CHANGELOG.md +47 -2
  3. package/README.md +10 -6
  4. package/dist/accordion/accordion.css.map +1 -1
  5. package/dist/body/body.css +1 -0
  6. package/dist/body/body.css.map +1 -0
  7. package/dist/breakout/breakout.css +1 -1
  8. package/dist/breakout/breakout.css.map +1 -1
  9. package/dist/description-list/description-list.css +1 -1
  10. package/dist/description-list/description-list.css.map +1 -1
  11. package/dist/dialog/dialog.css +1 -1
  12. package/dist/dialog/dialog.css.map +1 -1
  13. package/dist/field-set/field-set.css +1 -1
  14. package/dist/field-set/field-set.css.map +1 -1
  15. package/dist/grid/grid.css +1 -1
  16. package/dist/grid/grid.css.map +1 -1
  17. package/dist/heading/heading.css +1 -1
  18. package/dist/heading/heading.css.map +1 -1
  19. package/dist/icon/icon.css +1 -1
  20. package/dist/icon/icon.css.map +1 -1
  21. package/dist/index.css +1 -1
  22. package/dist/index.css.map +1 -1
  23. package/dist/menu/menu.css +1 -1
  24. package/dist/menu/menu.css.map +1 -1
  25. package/dist/page-footer/page-footer.css +1 -1
  26. package/dist/page-footer/page-footer.css.map +1 -1
  27. package/dist/page-header/page-header.css +1 -1
  28. package/dist/page-header/page-header.css.map +1 -1
  29. package/dist/progress-list/progress-list.css +1 -1
  30. package/dist/progress-list/progress-list.css.map +1 -1
  31. package/dist/prose/prose.css +1 -0
  32. package/dist/prose/prose.css.map +1 -0
  33. package/dist/tab-navigation/tab-navigation.css +1 -0
  34. package/dist/tab-navigation/tab-navigation.css.map +1 -0
  35. package/dist/table/table.css +1 -1
  36. package/dist/table/table.css.map +1 -1
  37. package/package.json +4 -4
  38. package/src/components/accordion/accordion.scss +0 -4
  39. package/src/components/body/README.md +15 -0
  40. package/src/components/{document/document.scss → body/body.scss} +2 -1
  41. package/src/components/breakout/breakout.scss +14 -2
  42. package/src/components/description-list/description-list.scss +20 -4
  43. package/src/components/dialog/dialog.scss +28 -7
  44. package/src/components/field-set/field-set.scss +1 -0
  45. package/src/components/gap/README.md +2 -0
  46. package/src/components/grid/README.md +4 -0
  47. package/src/components/grid/_mixins.scss +43 -5
  48. package/src/components/grid/grid.scss +47 -1
  49. package/src/components/heading/heading.scss +0 -5
  50. package/src/components/icon/icon.scss +0 -7
  51. package/src/components/index.scss +3 -3
  52. package/src/components/margin/README.md +1 -0
  53. package/src/components/menu/menu.scss +27 -24
  54. package/src/components/page-footer/page-footer.scss +11 -2
  55. package/src/components/page-header/page-header.scss +26 -10
  56. package/src/components/progress-list/README.md +2 -1
  57. package/src/components/progress-list/progress-list.scss +14 -3
  58. package/src/components/prose/README.md +15 -0
  59. package/src/components/prose/prose.scss +104 -0
  60. package/src/components/standalone-link/standalone-link.scss +0 -5
  61. package/src/components/tab-navigation/README.md +13 -0
  62. package/src/components/tab-navigation/tab-navigation.scss +101 -0
  63. package/src/components/table/README.md +4 -5
  64. package/src/components/table/table.scss +15 -0
  65. package/src/components/tabs/README.md +9 -27
  66. package/dist/document/document.css +0 -1
  67. package/dist/document/document.css.map +0 -1
  68. package/dist/icon/icon.deprecated.css +0 -1
  69. package/dist/icon/icon.deprecated.css.map +0 -1
  70. package/dist/page-heading/page-heading.deprecated.css +0 -1
  71. package/dist/page-heading/page-heading.deprecated.css.map +0 -1
  72. package/src/components/icon/icon.deprecated.scss +0 -12
  73. package/src/components/page-heading/README.md +0 -3
  74. package/src/components/page-heading/page-heading.deprecated.scss +0 -33
@@ -7,9 +7,12 @@
7
7
  @use "mixins" as *;
8
8
 
9
9
  $ams-grid-column-count: 12;
10
+ $ams-grid-row-span-max: 4;
10
11
 
11
12
  .ams-grid {
12
13
  @include ams-grid;
14
+
15
+ align-items: start;
13
16
  }
14
17
 
15
18
  // Grid gap
@@ -64,7 +67,26 @@ $ams-grid-column-count: 12;
64
67
  @include ams-grid--padding-vertical--2x-large;
65
68
  }
66
69
 
67
- // Column span
70
+ // Cell
71
+
72
+ .ams-grid__cell {
73
+ background-color: var(--ams-grid-cell-background-color);
74
+ padding-block: var(--ams-grid-cell-padding-block);
75
+ padding-inline: var(--ams-grid-cell-padding-inline);
76
+ }
77
+
78
+ .ams-grid__cell--flush {
79
+ padding-block: 0;
80
+ padding-inline: 0;
81
+ }
82
+
83
+ .ams-grid__cell--transparent {
84
+ background-color: transparent;
85
+ padding-block: 0;
86
+ padding-inline: 0;
87
+ }
88
+
89
+ // Cell span and start
68
90
  // The order of these declaration blocks ensures the intended specificity.
69
91
 
70
92
  .ams-grid__cell--span-all {
@@ -104,3 +126,27 @@ $ams-grid-column-count: 12;
104
126
  }
105
127
  }
106
128
  }
129
+
130
+ // Cell row span
131
+
132
+ @for $i from 1 through $ams-grid-row-span-max {
133
+ .ams-grid__cell--row-span-#{$i} {
134
+ @include ams-grid__cell--row-span($i);
135
+ }
136
+ }
137
+
138
+ @media (min-width: $ams-breakpoint-medium) {
139
+ @for $i from 1 through $ams-grid-row-span-max {
140
+ .ams-grid__cell--row-span-#{$i}-medium {
141
+ @include ams-grid__cell--row-span-medium($i);
142
+ }
143
+ }
144
+ }
145
+
146
+ @media (min-width: $ams-breakpoint-wide) {
147
+ @for $i from 1 through $ams-grid-row-span-max {
148
+ .ams-grid__cell--row-span-#{$i}-wide {
149
+ @include ams-grid__cell--row-span-wide($i);
150
+ }
151
+ }
152
+ }
@@ -55,11 +55,6 @@
55
55
  line-height: var(--ams-heading-5-line-height);
56
56
  }
57
57
 
58
- .ams-heading--6 {
59
- font-size: var(--ams-heading-6-font-size);
60
- line-height: var(--ams-heading-6-line-height);
61
- }
62
-
63
58
  .ams-heading--inverse {
64
59
  color: var(--ams-heading-inverse-color);
65
60
  }
@@ -77,10 +77,3 @@
77
77
  font-size: var(--ams-icon-heading-5-font-size);
78
78
  line-height: var(--ams-icon-heading-5-line-height);
79
79
  }
80
-
81
- .ams-icon--heading-6 {
82
- --ams-line-height: var(--ams-icon-heading-6-line-height);
83
-
84
- font-size: var(--ams-icon-heading-6-font-size);
85
- line-height: var(--ams-icon-heading-6-line-height);
86
- }
@@ -11,6 +11,7 @@
11
11
  @use "avatar/avatar";
12
12
  @use "badge/badge";
13
13
  @use "blockquote/blockquote";
14
+ @use "body/body";
14
15
  @use "breadcrumb/breadcrumb";
15
16
  @use "breakout/breakout";
16
17
  @use "button/button";
@@ -22,7 +23,6 @@
22
23
  @use "date-input/date-input";
23
24
  @use "description-list/description-list";
24
25
  @use "dialog/dialog";
25
- @use "document/document";
26
26
  @use "error-message/error-message";
27
27
  @use "field-set/field-set";
28
28
  @use "field/field";
@@ -35,7 +35,6 @@
35
35
  @use "hint/hint";
36
36
  @use "icon-button/icon-button";
37
37
  @use "icon/icon";
38
- @use "icon/icon.deprecated" as *;
39
38
  @use "image-slider/image-slider";
40
39
  @use "image/image";
41
40
  @use "invalid-form-alert/invalid-form-alert";
@@ -51,11 +50,11 @@
51
50
  @use "page/page";
52
51
  @use "page-footer/page-footer";
53
52
  @use "page-header/page-header";
54
- @use "page-heading/page-heading.deprecated" as *;
55
53
  @use "pagination/pagination";
56
54
  @use "paragraph/paragraph";
57
55
  @use "password-input/password-input";
58
56
  @use "progress-list/progress-list";
57
+ @use "prose/prose";
59
58
  @use "radio/radio";
60
59
  @use "row/row";
61
60
  @use "search-field/search-field";
@@ -66,6 +65,7 @@
66
65
  @use "switch/switch";
67
66
  @use "table-of-contents/table-of-contents";
68
67
  @use "table/table";
68
+ @use "tab-navigation/tab-navigation";
69
69
  @use "tabs/tabs";
70
70
  @use "text-area/text-area";
71
71
  @use "text-input/text-input";
@@ -30,3 +30,4 @@ They are also smaller in [Compact Mode](https://designsystem.amsterdam/docs/docs
30
30
  Consult [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_box_model/Mastering_margin_collapsing) for details.
31
31
  - 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.
32
32
  This helps in loops: it prevents having to treat the last element differently.
33
+ - Wrap editorial content in the [Prose](/docs/utilities-css-prose--docs) utility class to have all spacing set automatically.
@@ -24,16 +24,34 @@
24
24
  padding-inline: calc(var(--ams-grid-padding-inline) - var(--ams-menu-link-padding-inline));
25
25
 
26
26
  @media (min-width: $ams-breakpoint-medium) {
27
- margin-inline: calc(var(--ams-grid-medium-padding-inline) * -1);
28
- padding-inline: var(--ams-grid-medium-padding-inline);
27
+ margin-inline: calc(
28
+ var(
29
+ --ams-grid-medium-padding-inline /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
30
+ var(--ams-grid-vi-medium-padding-inline)
31
+ ) *
32
+ -1
33
+ );
34
+ padding-inline: var(
35
+ --ams-grid-medium-padding-inline /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
36
+ var(--ams-grid-vi-medium-padding-inline)
37
+ );
29
38
  }
30
39
 
31
40
  @media (min-width: $ams-breakpoint-wide) {
32
41
  display: none;
33
42
  margin-inline: 0; // Override negative margin above.
34
- max-inline-size: var(--ams-menu-wide-max-inline-size);
35
- padding-block: var(--ams-menu-wide-padding-block);
36
- padding-inline: var(--ams-menu-wide-padding-inline);
43
+ max-inline-size: var(
44
+ --ams-menu-wide-max-inline-size /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
45
+ var(--ams-menu-vi-wide-max-inline-size)
46
+ );
47
+ padding-block: var(
48
+ --ams-menu-wide-padding-block /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
49
+ var(--ams-menu-vi-wide-padding-block)
50
+ );
51
+ padding-inline: var(
52
+ --ams-menu-wide-padding-inline /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
53
+ var(--ams-menu-vi-wide-padding-inline)
54
+ );
37
55
  }
38
56
  }
39
57
 
@@ -83,7 +101,10 @@
83
101
  align-items: center;
84
102
  display: flex; // The links do stretch in the vertical layout of Menu.
85
103
  flex-direction: column;
86
- gap: var(--ams-menu-link-wide-gap);
104
+ gap: var(
105
+ --ams-menu-link-wide-gap /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
106
+ var(--ams-menu-link-vi-wide-gap)
107
+ );
87
108
  text-align: center;
88
109
 
89
110
  .ams-menu__icon {
@@ -92,21 +113,3 @@
92
113
  }
93
114
  }
94
115
  }
95
-
96
- /** @deprecated The menu has a dark background now, so this is no longer needed. */
97
- .ams-menu__link--contrast {
98
- color: var(--ams-menu-link-contrast-color);
99
-
100
- &:hover {
101
- color: var(--ams-menu-link-contrast-hover-color);
102
- }
103
- }
104
-
105
- /** @deprecated The menu has a dark background now, so this is no longer needed. */
106
- .ams-menu__link--inverse {
107
- color: var(--ams-menu-link-inverse-color);
108
-
109
- &:hover {
110
- color: var(--ams-menu-link-inverse-hover-color);
111
- }
112
- }
@@ -18,6 +18,7 @@
18
18
  .ams-page-footer__menu {
19
19
  @include reset-ul;
20
20
 
21
+ background-color: var(--ams-page-footer-menu-background-color);
21
22
  column-gap: var(--ams-page-footer-menu-column-gap);
22
23
  display: flex;
23
24
  flex-wrap: wrap;
@@ -26,11 +27,19 @@
26
27
  row-gap: var(--ams-page-footer-menu-row-gap);
27
28
 
28
29
  @media (min-width: $ams-breakpoint-medium) {
29
- padding-inline: var(--ams-page-footer-menu-medium-padding-inline);
30
+ padding-inline: var(
31
+ --ams-page-footer-menu-medium-padding-inline
32
+ /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
33
+ var(--ams-page-footer-menu-vi-medium-padding-inline)
34
+ );
30
35
  }
31
36
 
32
37
  @media (min-width: $ams-breakpoint-wide) {
33
- padding-inline: var(--ams-page-footer-menu-wide-padding-inline);
38
+ padding-inline: var(
39
+ --ams-page-footer-menu-wide-padding-inline
40
+ /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
41
+ var(--ams-page-footer-menu-vi-wide-padding-inline)
42
+ );
34
43
  }
35
44
  }
36
45
 
@@ -12,19 +12,25 @@
12
12
  /*
13
13
  * The logo link section is created twice: once outside the navigation and once hidden inside it.
14
14
  * This keeps all navigation in one nav element and lets the menu wrap around the logo link section.
15
- * Display grid is used to let both logo link sections overlap.
16
15
  */
17
- display: grid;
16
+ background-color: var(--ams-page-header-background-color);
17
+ display: grid; /* Allows both instances of Logo Link to overlap */
18
18
  font-family: var(--ams-page-header-font-family);
19
19
  padding-block: var(--ams-page-header-padding-block);
20
20
  padding-inline: var(--ams-page-header-padding-inline);
21
21
 
22
22
  @media (min-width: $ams-breakpoint-medium) {
23
- padding-inline: var(--ams-page-header-medium-padding-inline);
23
+ padding-inline: var(
24
+ --ams-page-header-medium-padding-inline /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
25
+ var(--ams-page-header-vi-medium-padding-inline)
26
+ );
24
27
  }
25
28
 
26
29
  @media (min-width: $ams-breakpoint-wide) {
27
- padding-inline: var(--ams-page-header-wide-padding-inline);
30
+ padding-inline: var(
31
+ --ams-page-header-wide-padding-inline /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
32
+ var(--ams-page-header-vi-wide-padding-inline)
33
+ );
28
34
  }
29
35
  }
30
36
 
@@ -33,7 +39,7 @@
33
39
  align-self: start; // To align the logo link section to the top of the header when it wraps
34
40
  column-gap: var(--ams-page-header-logo-link-column-gap);
35
41
  display: flex;
36
- grid-area: 1 / 1; // To allow this section to overlap with the second logo link section
42
+ grid-area: 1 / 1; /* Lets this visible instance of Logo Link overlap the hidden one in Navigation. */
37
43
  inline-size: fit-content;
38
44
  outline-offset: var(--ams-page-header-logo-link-outline-offset);
39
45
  text-decoration: none;
@@ -95,7 +101,7 @@
95
101
  column-gap: var(--ams-page-header-navigation-column-gap);
96
102
  display: flex;
97
103
  flex-wrap: wrap;
98
- grid-area: 1 / 1; // To allow this section to overlap with the logo link section
104
+ grid-area: 1 / 1; /* Makes the hidden Logo Link child overlap the visible one. */
99
105
  // This section blocks pointer events initially, so the hidden logo link section can't be activated.
100
106
  // The menu and collapsible menu set it back to auto, to make sure they can be activated.
101
107
  pointer-events: none;
@@ -128,6 +134,10 @@
128
134
  }
129
135
 
130
136
  @mixin page-header-menu-action {
137
+ color: var(
138
+ --ams-page-header-menu-item-color
139
+ ); /* This token is @deprecated. Will be removed on or after 2026-09-13. */
140
+
131
141
  font-size: var(--ams-page-header-menu-item-font-size);
132
142
  font-weight: var(--ams-page-header-menu-item-font-weight);
133
143
  line-height: var(--ams-page-header-menu-item-line-height);
@@ -144,6 +154,8 @@
144
154
  }
145
155
 
146
156
  .ams-page-header__menu-link {
157
+ @include page-header-menu-action;
158
+
147
159
  color: var(--ams-page-header-menu-link-color);
148
160
  display: inline-flex;
149
161
  gap: var(--ams-page-header-menu-link-gap);
@@ -151,8 +163,6 @@
151
163
  text-decoration-thickness: var(--ams-page-header-menu-link-text-decoration-thickness);
152
164
  text-underline-offset: var(--ams-page-header-menu-link-text-underline-offset);
153
165
 
154
- @include page-header-menu-action;
155
-
156
166
  &:hover {
157
167
  text-decoration-line: var(--ams-page-header-menu-link-hover-text-decoration-line);
158
168
  }
@@ -170,6 +180,7 @@
170
180
 
171
181
  .ams-page-header__mega-menu-button {
172
182
  @include reset-button;
183
+ @include page-header-menu-action;
173
184
 
174
185
  background-color: var(--ams-page-header-mega-menu-button-background-color);
175
186
  color: var(--ams-page-header-mega-menu-button-color);
@@ -180,18 +191,23 @@
180
191
  grid-auto-flow: column;
181
192
  padding-inline: var(--ams-page-header-mega-menu-button-padding-inline);
182
193
 
183
- @include page-header-menu-action;
184
194
  @include print-exact;
185
195
 
186
196
  &:hover {
187
197
  background-color: var(--ams-page-header-mega-menu-button-hover-background-color);
188
198
  color: var(--ams-page-header-mega-menu-button-hover-color);
189
199
  }
200
+
201
+ &[aria-expanded="true"] {
202
+ font-weight: var(
203
+ --ams-page-header-mega-menu-button-label-open-font-weight
204
+ ); /* This token is @deprecated. Will be removed on or after 2026-09-13. */
205
+ }
190
206
  }
191
207
 
192
208
  .ams-page-header__mega-menu-button-label,
193
209
  .ams-page-header__mega-menu-button-hidden-label {
194
- /* @deprecated These class names will be removed in 6.0.0. */
210
+ /* @deprecated These class names will be removed on or after 2026-09-13. */
195
211
  }
196
212
 
197
213
  .ams-page-header__menu-icon-top,
@@ -6,9 +6,10 @@ Displays the progress of a sequence of steps, with optional additional details p
6
6
 
7
7
  ## Guidelines
8
8
 
9
- - Choose the correct level for the steps’ headings.
9
+ - Choose the correct level for the headings of the steps.
10
10
  - Assign a status to each step: _completed_ or _current_.
11
11
  Steps without a status are considered _upcoming_.
12
12
  - Maintain a correct chronological order.
13
13
  Only one step may be _current_; preceding steps must be _completed_.
14
+ - Decide whether the user should be able to collapse and expand steps.
14
15
  - Progress List must only be used on a white background.
@@ -38,7 +38,10 @@
38
38
  gap: var(--ams-progress-list-step-gap);
39
39
 
40
40
  @media (min-width: $ams-breakpoint-medium) {
41
- gap: var(--ams-progress-list-step-medium-gap);
41
+ gap: var(
42
+ --ams-progress-list-step-medium-gap /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
43
+ var(--ams-progress-list-step-vi-medium-gap)
44
+ );
42
45
  }
43
46
  }
44
47
 
@@ -239,9 +242,17 @@
239
242
  @include indicator;
240
243
 
241
244
  @media (min-width: $ams-breakpoint-medium) {
242
- margin-inline-end: var(--ams-progress-list-substeps-step-indicator-medium-margin-inline-end);
245
+ margin-inline-end: var(
246
+ --ams-progress-list-substeps-step-indicator-medium-margin-inline-end
247
+ /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
248
+ var(--ams-progress-list-substeps-step-indicator-vi-medium-margin-inline-end)
249
+ );
243
250
  margin-inline-start: calc(
244
- -1 * var(--ams-progress-list-step-medium-gap) - var(--ams-progress-list-step-marker-shape-block-size)
251
+ -1 *
252
+ var(
253
+ --ams-progress-list-step-medium-gap /* This token is @deprecated. Will be removed on or after 2026-10-20. */,
254
+ var(--ams-progress-list-step-vi-medium-gap)
255
+ ) - var(--ams-progress-list-step-marker-shape-block-size)
245
256
  );
246
257
  }
247
258
  }
@@ -0,0 +1,15 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Prose
4
+
5
+ Applies the recommended vertical spacing between the direct children of a container, so editorial content flows without hand-picked margins.
6
+
7
+ ## Class name
8
+
9
+ `ams-prose`
10
+
11
+ ## Guidelines
12
+
13
+ - Wrap this utility class around editorial content to space its content according to the [Vertical space](/docs/docs-designer-guide-vertical-space--docs) recommendations.
14
+ - To add a single ad-hoc gap between two elements, prefer the [Margin Bottom](/docs/utilities-css-margin--docs) utility class on the first one.
15
+ - To add even spacing between a set of siblings, prefer the [Gap](/docs/utilities-css-gap--docs) utility class on their parent.
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ $_ams-body-block: ".ams-blockquote, .ams-image, .ams-paragraph--large, .ams-table";
7
+ $_ams-button-or-cta: ".ams-button, .ams-call-to-action-link";
8
+ $_ams-list-or-paragraph: ".ams-description-list, .ams-link-list, .ams-ordered-list, .ams-paragraph:not(.ams-paragraph--large), .ams-unordered-list";
9
+ $_ams-paragraph: ".ams-paragraph:not(.ams-paragraph--large)";
10
+
11
+ .ams-prose {
12
+ /* Fallback for older browsers: uniform spacing */
13
+ > .ams-heading {
14
+ margin-block-end: var(--ams-space-s);
15
+ }
16
+
17
+ > :not(.ams-heading) {
18
+ margin-block-end: var(--ams-space-m);
19
+ }
20
+
21
+ > :last-child {
22
+ margin-block-end: 0;
23
+ }
24
+
25
+ /* Context-aware spacing for browsers with :has() support */
26
+ /* stylelint-disable-next-line scss/operator-no-unspaced -- Prettier removes the space after ‘*’, which is valid CSS. */
27
+ @supports selector(:has(+ *)) {
28
+ /* Reset fallback margins */
29
+ > * {
30
+ margin-block-end: 0;
31
+ }
32
+
33
+ /* Body-to-body default */
34
+ > :not(.ams-heading):has(+ :not(.ams-heading)) {
35
+ margin-block-end: var(--ams-space-m);
36
+ }
37
+
38
+ /* Heavy body element (Blockquote, Image, Paragraph (large), Table) on either side */
39
+ > :is(#{$_ams-body-block}):has(+ :not(.ams-heading)),
40
+ > :not(.ams-heading):has(+ :is(#{$_ams-body-block})) {
41
+ margin-block-end: var(--ams-space-l);
42
+ }
43
+
44
+ /* Button or CTA Link followed by Button or CTA Link */
45
+ > :is(#{$_ams-button-or-cta}):has(+ :is(#{$_ams-button-or-cta})) {
46
+ margin-block-end: var(--ams-space-l);
47
+ }
48
+
49
+ /* Paragraph (large) before Blockquote or Image needs extra air */
50
+ > .ams-paragraph--large:has(+ :is(.ams-blockquote, .ams-image)) {
51
+ margin-block-end: var(--ams-space-xl);
52
+ }
53
+
54
+ /* Body content before an accordion needs a slightly larger gap */
55
+ > :not(.ams-heading):has(+ .ams-accordion) {
56
+ margin-block-end: var(--ams-space-l);
57
+ }
58
+
59
+ /* Body before a level 4 heading: default */
60
+ > :not(.ams-heading):has(+ :is(.ams-heading--4)) {
61
+ margin-block-end: var(--ams-space-l);
62
+ }
63
+
64
+ /* List or regular Paragraph before a level 4 heading: tighter */
65
+ > :is(#{$_ams-list-or-paragraph}):has(+ :is(.ams-heading--4)) {
66
+ margin-block-end: var(--ams-space-m);
67
+ }
68
+
69
+ /* Any element before a level 3 heading (subsection boundary) */
70
+ > *:has(+ .ams-heading--3) {
71
+ margin-block-end: var(--ams-space-l);
72
+ }
73
+
74
+ /* Any element before a level 2 heading (section boundary) */
75
+ > *:has(+ .ams-heading--2) {
76
+ margin-block-end: var(--ams-space-xl);
77
+ }
78
+
79
+ /* Heading level 3 followed by its content */
80
+ > .ams-heading--3:has(+ :not(.ams-heading)) {
81
+ margin-block-end: var(--ams-space-xs);
82
+ }
83
+
84
+ /* Heading level 2 followed by its content */
85
+ > .ams-heading--2:has(+ :not(.ams-heading)) {
86
+ margin-block-end: var(--ams-space-s);
87
+ }
88
+
89
+ /* Heading level 1 followed by a regular Paragraph */
90
+ > .ams-heading--1:has(+ #{$_ams-paragraph}) {
91
+ margin-block-end: var(--ams-space-xs);
92
+ }
93
+
94
+ /* Heading level 1 followed by a Paragraph (large), typically lead or metadata */
95
+ > .ams-heading--1:has(+ .ams-paragraph--large) {
96
+ margin-block-end: var(--ams-space-m);
97
+ }
98
+
99
+ /* Heading level 2 or 3 followed by another heading */
100
+ > :is(.ams-heading--2, .ams-heading--3):has(+ .ams-heading) {
101
+ margin-block-end: var(--ams-space-m);
102
+ }
103
+ }
104
+ }
@@ -43,8 +43,3 @@
43
43
  color: var(--ams-standalone-link-inverse-hover-color);
44
44
  }
45
45
  }
46
-
47
- /* stylelint-disable-next-line block-no-empty */
48
- .ams-standalone-link--with-icon {
49
- /* This class name is deprecated. */
50
- }
@@ -0,0 +1,13 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Tab Navigation
4
+
5
+ A horizontal or vertical list of links, styled as tabs, to navigate between a set of related pages.
6
+
7
+ ## Guidelines
8
+
9
+ - Use Tab Navigation for navigating between pages that each have their own main content.
10
+ Thanks to using links, every tab’s content has its own url that the user can open in a new window, share, or bookmark.
11
+ - Use [Tabs](https://designsystem.amsterdam/?path=/docs/components-containers-tabs--docs) instead to switch between small pieces of secondary content without navigating away.
12
+ - Use the vertical orientation to stack links below each other, e.g. in a sidebar.
13
+ - Add `aria-current="page"` to the link pointing to the current page.
@@ -0,0 +1,101 @@
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/resets" as *;
9
+
10
+ .ams-tab-navigation__list {
11
+ @include reset-ul;
12
+
13
+ box-shadow: var(--ams-tab-navigation-list-box-shadow);
14
+ display: flex;
15
+ overflow-x: auto;
16
+ overscroll-behavior-x: contain;
17
+ scroll-snap-type: x mandatory;
18
+ }
19
+
20
+ @media (min-width: $ams-breakpoint-medium) {
21
+ .ams-tab-navigation--vertical {
22
+ @include hyphenation;
23
+
24
+ .ams-tab-navigation__list {
25
+ box-shadow: var(--ams-tab-navigation-list-vertical-box-shadow);
26
+ flex-direction: column;
27
+ overflow-x: visible;
28
+ }
29
+ }
30
+ }
31
+
32
+ .ams-tab-navigation__item {
33
+ flex-shrink: 0;
34
+ scroll-snap-align: start;
35
+ }
36
+
37
+ .ams-tab-navigation__link {
38
+ align-items: center;
39
+ color: var(--ams-tab-navigation-link-color);
40
+ cursor: var(--ams-tab-navigation-link-cursor);
41
+ display: flex;
42
+ font-family: var(--ams-tab-navigation-link-font-family);
43
+ font-size: var(--ams-tab-navigation-link-font-size);
44
+ font-weight: var(--ams-tab-navigation-link-font-weight);
45
+ gap: var(--ams-tab-navigation-link-gap);
46
+ line-height: var(--ams-tab-navigation-link-line-height);
47
+ outline-offset: var(--ams-tab-navigation-link-outline-offset);
48
+ padding-block: var(--ams-tab-navigation-link-padding-block);
49
+ padding-inline: var(--ams-tab-navigation-link-padding-inline);
50
+ text-decoration-line: none;
51
+
52
+ &:hover {
53
+ color: var(--ams-tab-navigation-link-hover-color);
54
+ }
55
+
56
+ &:hover:not([aria-current="page"]) {
57
+ box-shadow: var(--ams-tab-navigation-link-hover-box-shadow);
58
+ }
59
+
60
+ &[aria-current="page"] {
61
+ box-shadow: var(--ams-tab-navigation-link-current-box-shadow);
62
+ font-weight: var(--ams-tab-navigation-link-current-font-weight);
63
+
64
+ @media (forced-colors: active) {
65
+ background-color: SelectedItem;
66
+ }
67
+ }
68
+
69
+ @media (min-width: $ams-breakpoint-medium) {
70
+ .ams-tab-navigation--vertical &:hover:not([aria-current="page"]) {
71
+ box-shadow: var(--ams-tab-navigation-link-vertical-hover-box-shadow);
72
+ }
73
+
74
+ .ams-tab-navigation--vertical &[aria-current="page"] {
75
+ box-shadow: var(--ams-tab-navigation-link-vertical-current-box-shadow);
76
+ }
77
+ }
78
+ }
79
+
80
+ .ams-tab-navigation__link-label-wrapper {
81
+ display: grid;
82
+ }
83
+
84
+ .ams-tab-navigation__link-label,
85
+ .ams-tab-navigation__link-label-hidden {
86
+ display: initial;
87
+ grid-area: 1 / 1;
88
+ }
89
+
90
+ // This hidden label is used to prevent a layout shift when the link is current
91
+ // and the link text becomes bold.
92
+ .ams-tab-navigation__link-label-hidden {
93
+ font-weight: var(--ams-tab-navigation-link-current-font-weight);
94
+ pointer-events: none;
95
+ -webkit-user-select: none;
96
+
97
+ /* Safari support is added with the prefixed property. */
98
+ /* stylelint-disable-next-line plugin/use-baseline */
99
+ user-select: none;
100
+ visibility: hidden;
101
+ }
@@ -2,11 +2,10 @@
2
2
 
3
3
  # Table
4
4
 
5
- Use the table component to let users compare information in rows and columns.
6
- Table is used to display simple information that does not need to be filtered or edited.
5
+ Structures data in rows and columns to help users work with large amounts of information.
7
6
 
8
7
  ## Guidelines
9
8
 
10
- - Add a caption to help users find, navigate and understand the table.
11
- - Include a [Heading](https://designsystem.amsterdam/?path=/docs/components-text-heading--docs) in the Table Caption,
12
- unless the table is in a [Figure](http://designsystem.amsterdam/?path=/docs/components-media-figure--docs) which has a Figure Caption.
9
+ - Add a caption so users can find and understand the table without reading its data.
10
+ - Use a [Heading](https://designsystem.amsterdam/?path=/docs/components-text-heading--docs) in the caption, at the level that fits the document outline.
11
+ It becomes the table’s accessible name, announced by screen readers on every encounter.