@amsterdam/design-system-css 0.14.0 → 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 +58 -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 +10 -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
@@ -9,14 +9,14 @@ Constrains media content to a supported aspect ratio.
9
9
  Each available aspect ratio has an associated class name.
10
10
  The class can be applied to any component or element.
11
11
 
12
- | Class name | Example |
13
- | :-------------------------- | :-------------------------------------------------------------------------- |
14
- | `ams-aspect-ratio--x-tall` | <div className="ams-docs-token-example--space ams-aspect-ratio--x-tall" /> |
15
- | `ams-aspect-ratio--tall` | <div className="ams-docs-token-example--space ams-aspect-ratio--tall" /> |
16
- | `ams-aspect-ratio--square` | <div className="ams-docs-token-example--space ams-aspect-ratio--square" /> |
17
- | `ams-aspect-ratio--wide` | <div className="ams-docs-token-example--space ams-aspect-ratio--wide" /> |
18
- | `ams-aspect-ratio--x-wide` | <div className="ams-docs-token-example--space ams-aspect-ratio--x-wide" /> |
19
- | `ams-aspect-ratio--2x-wide` | <div className="ams-docs-token-example--space ams-aspect-ratio--2x-wide" /> |
12
+ | Class name | Example |
13
+ | :---------------------- | :---------------------------------------------------------------------- |
14
+ | `ams-aspect-ratio-9-16` | <div className="ams-docs-token-example--space ams-aspect-ratio-9-16" /> |
15
+ | `ams-aspect-ratio-3-4` | <div className="ams-docs-token-example--space ams-aspect-ratio-3-4" /> |
16
+ | `ams-aspect-ratio-1-1` | <div className="ams-docs-token-example--space ams-aspect-ratio-1-1" /> |
17
+ | `ams-aspect-ratio-4-3` | <div className="ams-docs-token-example--space ams-aspect-ratio-4-3" /> |
18
+ | `ams-aspect-ratio-16-9` | <div className="ams-docs-token-example--space ams-aspect-ratio-16-9" /> |
19
+ | `ams-aspect-ratio-16-5` | <div className="ams-docs-token-example--space ams-aspect-ratio-16-5" /> |
20
20
 
21
21
  ## Guidelines
22
22
 
@@ -4,9 +4,12 @@
4
4
  */
5
5
 
6
6
  .ams-aspect-ratio {
7
- @each $name in ("x-tall", "tall", "square", "wide", "x-wide", "2x-wide") {
8
- &--#{$name} {
9
- aspect-ratio: var(--ams-aspect-ratio-#{$name}) !important;
7
+ // If you modify this list, you must also update the
8
+ // aspectRatioOptions in packages/react/src/common/types.ts
9
+ @each $value in ("9-16", "3-4", "1-1", "4-3", "16-9", "16-5") {
10
+ &-#{$value} {
11
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
12
+ aspect-ratio: var(--ams-aspect-ratio-#{$value}) !important;
10
13
  }
11
14
  }
12
15
  }
@@ -6,10 +6,11 @@ A circular badge representing a person.
6
6
 
7
7
  ## Design
8
8
 
9
- The avatar contains 1 or 2 initial letters from the person's full name, a picture, or a generic icon.
10
- The default background colour is dark blue.
9
+ - The avatar contains 1 or 2 initial letters from the persons full name, a picture, or a generic icon.
11
10
 
12
11
  ## Guidelines
13
12
 
14
- - Display an avatar for the person currently using the application,
15
- or to associate a person with a content item.
13
+ - Show an avatar for the user of the application, or to associate a person with a content item.
14
+ - To personalize the Avatar, the user can be allowed to choose one of the [highlight colours](/docs/brand-design-tokens-colour--docs).
15
+ The default is purple.
16
+ The design system does not define a meaning to any of these background colours.
@@ -5,7 +5,9 @@
5
5
 
6
6
  .ams-avatar {
7
7
  aspect-ratio: var(--ams-avatar-aspect-ratio);
8
+ background-color: var(--ams-avatar-background-color);
8
9
  border-radius: 50%;
10
+ color: var(--ams-avatar-color);
9
11
  display: inline-flex;
10
12
  font-family: var(--ams-avatar-font-family);
11
13
  font-size: var(--ams-avatar-font-size);
@@ -37,19 +39,9 @@
37
39
  vertical-align: middle; /* Remove ‘phantom’ white space when image doesn’t load */
38
40
  }
39
41
 
40
- .ams-avatar--black {
41
- background-color: var(--ams-avatar-black-background-color);
42
- color: var(--ams-avatar-black-color);
43
- }
44
-
45
- .ams-avatar--blue {
46
- background-color: var(--ams-avatar-blue-background-color);
47
- color: var(--ams-avatar-blue-color);
48
- }
49
-
50
- .ams-avatar--dark-green {
51
- background-color: var(--ams-avatar-dark-green-background-color);
52
- color: var(--ams-avatar-dark-green-color);
42
+ .ams-avatar--azure {
43
+ background-color: var(--ams-avatar-azure-background-color);
44
+ color: var(--ams-avatar-azure-color);
53
45
  }
54
46
 
55
47
  .ams-avatar--green {
@@ -57,24 +49,9 @@
57
49
  color: var(--ams-avatar-green-color);
58
50
  }
59
51
 
60
- .ams-avatar--grey-1 {
61
- background-color: var(--ams-avatar-grey-1-background-color);
62
- color: var(--ams-avatar-grey-1-color);
63
- }
64
-
65
- .ams-avatar--grey-2 {
66
- background-color: var(--ams-avatar-grey-2-background-color);
67
- color: var(--ams-avatar-grey-2-color);
68
- }
69
-
70
- .ams-avatar--grey-3 {
71
- background-color: var(--ams-avatar-grey-3-background-color);
72
- color: var(--ams-avatar-grey-3-color);
73
- }
74
-
75
- .ams-avatar--light-blue {
76
- background-color: var(--ams-avatar-light-blue-background-color);
77
- color: var(--ams-avatar-light-blue-color);
52
+ .ams-avatar--lime {
53
+ background-color: var(--ams-avatar-lime-background-color);
54
+ color: var(--ams-avatar-lime-color);
78
55
  }
79
56
 
80
57
  .ams-avatar--magenta {
@@ -87,21 +64,6 @@
87
64
  color: var(--ams-avatar-orange-color);
88
65
  }
89
66
 
90
- .ams-avatar--purple {
91
- background-color: var(--ams-avatar-purple-background-color);
92
- color: var(--ams-avatar-purple-color);
93
- }
94
-
95
- .ams-avatar--red {
96
- background-color: var(--ams-avatar-red-background-color);
97
- color: var(--ams-avatar-red-color);
98
- }
99
-
100
- .ams-avatar--white {
101
- background-color: var(--ams-avatar-white-background-color);
102
- color: var(--ams-avatar-white-color);
103
- }
104
-
105
67
  .ams-avatar--yellow {
106
68
  background-color: var(--ams-avatar-yellow-background-color);
107
69
  color: var(--ams-avatar-yellow-color);
@@ -2,11 +2,12 @@
2
2
 
3
3
  # Badge
4
4
 
5
- A prominently coloured box containing 1 or 2 words.
6
- Guides the user in taking a specific action or describes its surrounding content.
5
+ A prominent label that indicates a category, property or instruction.
7
6
 
8
- ## Design
7
+ ## Guidelines
9
8
 
10
- The badge can contain a short text or a number.
11
- The default background colour is dark green.
12
- Suggestions on when to use the other colours will follow soon.
9
+ - Let the badge contain a short text or a number.
10
+ - Use any of the feedback or highlight [colours](/docs/brand-design-tokens-colour--docs) for the background.
11
+ The default is green.
12
+ Red, orange and green are especially useful for showing an error, warning, or success.
13
+ However, they can also be combined with the other colours without carrying these meanings.
@@ -3,53 +3,31 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
7
+ @use "../../common/text-rendering" as *;
8
+
6
9
  .ams-badge {
10
+ background-color: var(--ams-badge-background-color);
11
+ color: var(--ams-badge-color);
7
12
  display: inline-block;
8
13
  font-family: var(--ams-badge-font-family);
9
14
  font-size: var(--ams-badge-font-size);
10
15
  font-weight: var(--ams-badge-font-weight);
11
16
  line-height: var(--ams-badge-line-height);
12
17
  padding-inline: var(--ams-badge-padding-inline);
13
- }
14
-
15
- .ams-badge--black {
16
- background-color: var(--ams-badge-black-background-color);
17
- color: var(--ams-badge-black-color);
18
- }
19
-
20
- .ams-badge--blue {
21
- background-color: var(--ams-badge-blue-background-color);
22
- color: var(--ams-badge-blue-color);
23
- }
24
-
25
- .ams-badge--dark-green {
26
- background-color: var(--ams-badge-dark-green-background-color);
27
- color: var(--ams-badge-dark-green-color);
28
- }
29
-
30
- .ams-badge--green {
31
- background-color: var(--ams-badge-green-background-color);
32
- color: var(--ams-badge-green-color);
33
- }
34
18
 
35
- .ams-badge--grey-1 {
36
- background-color: var(--ams-badge-grey-1-background-color);
37
- color: var(--ams-badge-grey-1-color);
19
+ @include hyphenation;
20
+ @include text-rendering;
38
21
  }
39
22
 
40
- .ams-badge--grey-2 {
41
- background-color: var(--ams-badge-grey-2-background-color);
42
- color: var(--ams-badge-grey-2-color);
23
+ .ams-badge--azure {
24
+ background-color: var(--ams-badge-azure-background-color);
25
+ color: var(--ams-badge-azure-color);
43
26
  }
44
27
 
45
- .ams-badge--grey-3 {
46
- background-color: var(--ams-badge-grey-3-background-color);
47
- color: var(--ams-badge-grey-3-color);
48
- }
49
-
50
- .ams-badge--light-blue {
51
- background-color: var(--ams-badge-light-blue-background-color);
52
- color: var(--ams-badge-light-blue-color);
28
+ .ams-badge--lime {
29
+ background-color: var(--ams-badge-lime-background-color);
30
+ color: var(--ams-badge-lime-color);
53
31
  }
54
32
 
55
33
  .ams-badge--magenta {
@@ -72,11 +50,6 @@
72
50
  color: var(--ams-badge-red-color);
73
51
  }
74
52
 
75
- .ams-badge--white {
76
- background-color: var(--ams-badge-white-background-color);
77
- color: var(--ams-badge-white-color);
78
- }
79
-
80
53
  .ams-badge--yellow {
81
54
  background-color: var(--ams-badge-yellow-background-color);
82
55
  color: var(--ams-badge-yellow-color);
@@ -34,6 +34,6 @@
34
34
  }
35
35
  }
36
36
 
37
- .ams-blockquote--inverse-color {
37
+ .ams-blockquote--inverse {
38
38
  color: var(--ams-blockquote-inverse-color);
39
39
  }
@@ -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 {
@@ -22,6 +23,7 @@
22
23
  break-after: avoid;
23
24
  break-inside: avoid;
24
25
 
26
+ @include hyphenation;
25
27
  @include text-rendering;
26
28
  @include reset-ol;
27
29
  }
@@ -114,15 +114,15 @@ $ams-breakout-row-span-max: 4;
114
114
 
115
115
  .ams-breakout__cell--has-spotlight {
116
116
  display: grid; /* Stretches the empty Spotlight vertically. */
117
- margin-block: calc(var(--ams-space-grid-md) * -1);
118
- margin-inline: calc(var(--ams-space-grid-lg) * -1);
117
+ margin-block: calc(var(--ams-space-xl) * -1);
118
+ margin-inline: calc(var(--ams-space-2xl) * -1);
119
119
 
120
120
  .ams-breakout--gap-vertical--small > & {
121
- margin-block: calc(var(--ams-space-grid-sm) * -1);
121
+ margin-block: calc(var(--ams-space-l) * -1);
122
122
  }
123
123
 
124
124
  .ams-breakout--gap-vertical--large > & {
125
- margin-block: calc(var(--ams-space-grid-lg) * -1);
125
+ margin-block: calc(var(--ams-space-2xl) * -1);
126
126
  }
127
127
  }
128
128
 
@@ -9,7 +9,7 @@ Allows the user to perform actions and operate the user interface.
9
9
  - Choose a short label that describes the function of the button.
10
10
  - Use the correct type of button for the corresponding application, e.g. `type="submit"` for the primary form button.
11
11
  - Make sure one can operate a button through a keyboard.
12
- - Wrap 2 or more consecutive buttons and/or links in an [Action Group](?path=/docs/components-buttons-action-group--docs).
12
+ - Wrap 2 or more consecutive buttons and/or links in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-layout-action-group--docs).
13
13
  - Primary, secondary and tertiary buttons can be used side by side.
14
14
  Skipping levels is allowed.
15
15
 
@@ -3,10 +3,11 @@
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-button {
9
- border: 0;
10
+ border: none;
10
11
  margin-block: 0; // [1]
11
12
  margin-inline: 0; // [1]
12
13
 
@@ -18,6 +19,7 @@
18
19
  display: inline-flex;
19
20
  font-family: var(--ams-button-font-family);
20
21
  font-size: var(--ams-button-font-size);
22
+ font-weight: var(--ams-button-font-weight);
21
23
  gap: var(--ams-button-gap);
22
24
  justify-content: center;
23
25
  line-height: var(--ams-button-line-height);
@@ -26,6 +28,7 @@
26
28
  padding-inline: var(--ams-button-padding-inline);
27
29
  touch-action: manipulation;
28
30
 
31
+ @include hyphenation;
29
32
  @include text-rendering;
30
33
  @include reset-button;
31
34
 
@@ -7,35 +7,15 @@
7
7
  display: grid;
8
8
  gap: var(--ams-card-gap);
9
9
  outline-offset: var(--ams-card-outline-offset);
10
- position: relative;
10
+ position: relative; // Allows stretching the card link below.
11
11
  touch-action: manipulation;
12
12
 
13
- /* Set native outline on card if card has focus visible within */
13
+ // Set native outline to Card if it has a visible focus inside.
14
14
  &:has(:focus-visible) {
15
15
  outline-color: -webkit-focus-ring-color;
16
16
  outline-style: auto;
17
17
  outline-width: 0.0625rem;
18
18
  }
19
-
20
- /*
21
- Remove link focus outline only if :has is supported,
22
- which means the outline on the whole card is set
23
- */
24
- &:has(:focus-visible) a:focus {
25
- outline: none;
26
- }
27
-
28
- /*
29
- This trick, together with position: relative on the outer wrapper, makes the whole card clickable.
30
- Taken from https://inclusive-components.design/cards/
31
- */
32
- a::after {
33
- content: "";
34
- display: block;
35
- inset-block: 0;
36
- inset-inline: 0;
37
- position: absolute;
38
- }
39
19
  }
40
20
 
41
21
  .ams-card__heading-group {
@@ -50,8 +30,25 @@
50
30
  text-decoration-thickness: var(--ams-card-link-text-decoration-thickness);
51
31
  text-underline-offset: var(--ams-card-link-text-underline-offset);
52
32
 
33
+ // Make the whole Card clickable by making the link cover its entire area.
34
+ // Source: https://inclusive-components.design/cards/
35
+ &::after {
36
+ content: "";
37
+ display: block;
38
+ inset-block: 0;
39
+ inset-inline: 0;
40
+ position: absolute;
41
+ }
42
+
53
43
  &:hover {
54
44
  color: var(--ams-card-link-hover-color);
55
45
  text-decoration-line: var(--ams-card-link-hover-text-decoration-line);
56
46
  }
47
+
48
+ // Remove the outline from the link; it’s already on the Card.
49
+ // Reuses the `.ams-card:has(:focus-visible)` selector above, so that
50
+ // browsers that support it apply both styles, while those that don’t apply neither.
51
+ .ams-card:has(:focus-visible) &:focus {
52
+ outline: none;
53
+ }
57
54
  }
@@ -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
  .ams-character-count {
@@ -12,6 +13,7 @@
12
13
  font-weight: var(--ams-character-count-font-weight);
13
14
  line-height: var(--ams-character-count-line-height);
14
15
 
16
+ @include hyphenation;
15
17
  @include text-rendering;
16
18
  }
17
19
 
@@ -5,6 +5,7 @@
5
5
 
6
6
  @use "../../common/input-label-focus" as *;
7
7
  @use "../../common/hide-input" as *;
8
+ @use "../../common/hyphenation" as *;
8
9
  @use "../../common/text-rendering" as *;
9
10
 
10
11
  .ams-checkbox__input {
@@ -35,7 +36,7 @@
35
36
 
36
37
  .ams-checkbox__label {
37
38
  color: var(--ams-checkbox-color);
38
- cursor: pointer;
39
+ cursor: var(--ams-checkbox-cursor);
39
40
  display: inline-flex;
40
41
  font-family: var(--ams-checkbox-font-family);
41
42
  font-size: var(--ams-checkbox-font-size);
@@ -44,6 +45,7 @@
44
45
  line-height: var(--ams-checkbox-line-height);
45
46
  outline-offset: var(--ams-checkbox-outline-offset);
46
47
 
48
+ @include hyphenation;
47
49
  @include text-rendering;
48
50
 
49
51
  &:hover {
@@ -64,7 +66,7 @@
64
66
  + .ams-checkbox__label .ams-checkbox__checkmark::after {
65
67
  background-color: var(--ams-checkbox-checkmark-checked-background-color);
66
68
  background-image: var(--ams-checkbox-checkmark-checked-background-image);
67
- border: 0;
69
+ border: none;
68
70
  }
69
71
  }
70
72
 
@@ -76,7 +78,7 @@
76
78
  background-position: center;
77
79
  background-repeat: no-repeat;
78
80
  background-size: 1rem;
79
- border: 0;
81
+ border: none;
80
82
  }
81
83
  }
82
84
 
@@ -92,7 +94,7 @@
92
94
  .ams-checkbox__input:disabled {
93
95
  + .ams-checkbox__label {
94
96
  color: var(--ams-checkbox-disabled-color);
95
- cursor: not-allowed;
97
+ cursor: var(--ams-checkbox-disabled-cursor);
96
98
 
97
99
  .ams-checkbox__checkmark::after {
98
100
  border-color: var(--ams-checkbox-checkmark-disabled-border-color);
@@ -151,7 +153,6 @@
151
153
  :is(.ams-checkbox__input:invalid, .ams-checkbox__input[aria-invalid="true"])
152
154
  + .ams-checkbox__label:hover
153
155
  .ams-checkbox__checkmark::after {
154
- // TODO: this should be the (currently non-existent) dark red hover color
155
156
  border-color: var(--ams-checkbox-checkmark-invalid-hover-border-color);
156
157
  }
157
158
 
@@ -169,7 +170,6 @@
169
170
  :is(.ams-checkbox__input:invalid:checked, .ams-checkbox__input[aria-invalid="true"]:checked)
170
171
  + .ams-checkbox__label:hover
171
172
  .ams-checkbox__checkmark::after {
172
- // TODO: this should be the (currently non-existent) dark red hover color
173
173
  background-color: var(--ams-checkbox-checkmark-invalid-checked-hover-background-color);
174
174
  }
175
175
 
@@ -177,7 +177,6 @@
177
177
  :is(.ams-checkbox__input:invalid:indeterminate, .ams-checkbox__input[aria-invalid="true"]:indeterminate)
178
178
  + .ams-checkbox__label:hover
179
179
  .ams-checkbox__checkmark::after {
180
- // TODO: this should be the (currently non-existent) dark red hover color
181
180
  background-color: var(--ams-checkbox-checkmark-invalid-indeterminate-hover-background-color);
182
181
  }
183
182
 
@@ -3,22 +3,23 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- @use "../../common/size" as *;
7
-
8
6
  .ams-column {
9
7
  display: flex;
10
8
  flex-direction: column;
11
- gap: var(--ams-column-gap-md);
9
+ gap: var(--ams-column-gap-medium);
12
10
  }
13
11
 
14
- @each $size, $label in $ams-sizes {
15
- @if $size != "md" {
16
- .ams-column--gap-#{$label} {
17
- gap: var(--ams-column-gap-#{$size});
18
- }
12
+ @each $size in ("x-small", "small", "large", "x-large") {
13
+ .ams-column--gap-#{$size} {
14
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
15
+ gap: var(--ams-column-gap-#{$size});
19
16
  }
20
17
  }
21
18
 
19
+ .ams-column--gap-none {
20
+ gap: 0;
21
+ }
22
+
22
23
  .ams-column--align-around {
23
24
  justify-content: space-around;
24
25
  }
@@ -8,7 +8,7 @@
8
8
  @mixin reset-input {
9
9
  -webkit-appearance: none; // Reset appearance for Safari < 15.4
10
10
  appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
11
- border: 0;
11
+ border: none;
12
12
  border-radius: 0; // Reset rounded borders on iOS devices
13
13
  margin-block: 0;
14
14
  }
@@ -47,7 +47,7 @@
47
47
  .ams-date-input::-webkit-calendar-picker-indicator {
48
48
  appearance: none;
49
49
  background-image: var(--ams-date-input-calender-picker-indicator-background-image);
50
- cursor: pointer;
50
+ cursor: var(--ams-date-input-calender-picker-indicator-cursor);
51
51
  }
52
52
 
53
53
  .ams-date-input:hover::-webkit-calendar-picker-indicator {
@@ -58,7 +58,7 @@
58
58
  background-color: var(--ams-date-input-disabled-background-color);
59
59
  box-shadow: var(--ams-date-input-disabled-box-shadow);
60
60
  color: var(--ams-date-input-disabled-color);
61
- cursor: not-allowed;
61
+ cursor: var(--ams-date-input-disabled-cursor);
62
62
  }
63
63
 
64
64
  .ams-date-input:disabled::-webkit-calendar-picker-indicator {
@@ -71,7 +71,6 @@
71
71
  box-shadow: var(--ams-date-input-invalid-box-shadow);
72
72
 
73
73
  &:hover {
74
- // TODO: this should be the (currently non-existent) dark red hover color
75
74
  box-shadow: var(--ams-date-input-invalid-hover-box-shadow);
76
75
  }
77
76
  }
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  @use "../../common/breakpoint" as *;
7
+ @use "../../common/hyphenation" as *;
7
8
  @use "../../common/text-rendering" as *;
8
9
 
9
10
  @mixin reset-dl {
@@ -25,6 +26,7 @@
25
26
  row-gap: var(--ams-description-list-row-gap);
26
27
 
27
28
  @include reset-dl;
29
+ @include hyphenation;
28
30
  @include text-rendering;
29
31
  }
30
32
 
@@ -34,23 +36,23 @@
34
36
  grid-template-columns: auto 1fr;
35
37
  }
36
38
 
37
- .ams-description-list--terms-width-sm,
38
- .ams-description-list--terms-width-sm .ams-description-list__section {
39
- grid-template-columns: 1fr 4fr;
39
+ .ams-description-list--narrow,
40
+ .ams-description-list--narrow .ams-description-list__section {
41
+ grid-template-columns: var(--ams-description-list-narrow-grid-template-columns);
40
42
  }
41
43
 
42
- .ams-description-list--terms-width-md,
43
- .ams-description-list--terms-width-md .ams-description-list__section {
44
- grid-template-columns: 1fr 2fr;
44
+ .ams-description-list--medium,
45
+ .ams-description-list--medium .ams-description-list__section {
46
+ grid-template-columns: var(--ams-description-list-medium-grid-template-columns);
45
47
  }
46
48
 
47
- .ams-description-list--terms-width-lg,
48
- .ams-description-list--terms-width-lg .ams-description-list__section {
49
- grid-template-columns: 1fr 1fr;
49
+ .ams-description-list--wide,
50
+ .ams-description-list--wide .ams-description-list__section {
51
+ grid-template-columns: var(--ams-description-list-wide-grid-template-columns);
50
52
  }
51
53
  }
52
54
 
53
- .ams-description-list--inverse-color {
55
+ .ams-description-list--inverse {
54
56
  color: var(--ams-description-list-inverse-color);
55
57
  }
56
58
 
@@ -5,6 +5,8 @@
5
5
 
6
6
  @mixin reset-dialog {
7
7
  inset-block: 0;
8
+ padding-block: 0;
9
+ padding-inline: 0;
8
10
  }
9
11
 
10
12
  /* A dialog must have `display: none` until the `open` attribute is set,
@@ -13,20 +15,21 @@ so do not apply these styles without an `open` attribute. */
13
15
  background-color: var(--ams-dialog-background-color);
14
16
  border: var(--ams-dialog-border);
15
17
  box-sizing: border-box;
16
- display: flex; // Using flex here, because grid works strangely in Safari
18
+ display: flex; // We’d like to use CSS Grid here, but that doesn’t work as expected in Safari.
17
19
  flex-direction: column;
18
20
  gap: var(--ams-dialog-gap);
19
21
  inline-size: var(--ams-dialog-inline-size);
20
22
  max-block-size: var(--ams-dialog-max-block-size);
21
23
  max-inline-size: var(--ams-dialog-max-inline-size);
22
- padding-block: var(--ams-dialog-padding-block);
23
- padding-inline: var(--ams-dialog-padding-inline);
24
24
 
25
25
  @include reset-dialog;
26
26
 
27
- /* No token because dialog does not inherit from any element in FireFox and Safari */
27
+ /*
28
+ * The fallback value is for browsers where ::backdrop does not inherit from its originating element.
29
+ * @see https://caniuse.com/mdn-css_selectors_backdrop_inherit_from_originating_element
30
+ */
28
31
  &::backdrop {
29
- background: #0006;
32
+ background: var(--ams-dialog-backdrop-background-color, rgb(24 24 24 / 62.5%));
30
33
  }
31
34
  }
32
35
 
@@ -35,9 +38,18 @@ so do not apply these styles without an `open` attribute. */
35
38
  display: flex;
36
39
  gap: var(--ams-dialog-header-gap);
37
40
  justify-content: space-between;
41
+ padding-block: var(--ams-dialog-header-padding-block);
42
+ padding-inline: var(--ams-dialog-header-padding-inline);
38
43
  }
39
44
 
40
45
  .ams-dialog__body {
41
46
  overflow-y: auto;
42
47
  overscroll-behavior-y: contain;
48
+ padding-block: var(--ams-dialog-body-padding-block);
49
+ padding-inline: var(--ams-dialog-body-padding-inline);
50
+ }
51
+
52
+ .ams-dialog__footer {
53
+ padding-block: var(--ams-dialog-footer-padding-block);
54
+ padding-inline: var(--ams-dialog-footer-padding-inline);
43
55
  }
@@ -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 {
@@ -19,6 +20,7 @@
19
20
  gap: var(--ams-error-message-gap);
20
21
  line-height: var(--ams-error-message-line-height);
21
22
 
23
+ @include hyphenation;
22
24
  @include text-rendering;
23
25
  @include reset-p;
24
26
  }