@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.
- package/CHANGELOG.md +58 -0
- package/README.md +2 -0
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/action-group/action-group.css +1 -1
- package/dist/action-group/action-group.css.map +1 -1
- package/dist/alert/alert.css +1 -1
- package/dist/alert/alert.css.map +1 -1
- package/dist/aspect-ratio/aspect-ratio.css +1 -1
- package/dist/aspect-ratio/aspect-ratio.css.map +1 -1
- package/dist/avatar/avatar.css +1 -1
- package/dist/avatar/avatar.css.map +1 -1
- package/dist/badge/badge.css +1 -1
- package/dist/badge/badge.css.map +1 -1
- package/dist/blockquote/blockquote.css +1 -1
- package/dist/blockquote/blockquote.css.map +1 -1
- package/dist/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.css.map +1 -1
- package/dist/breakout/breakout.css +1 -1
- package/dist/breakout/breakout.css.map +1 -1
- package/dist/button/button.css +1 -1
- package/dist/button/button.css.map +1 -1
- package/dist/card/card.css +1 -1
- package/dist/card/card.css.map +1 -1
- package/dist/character-count/character-count.css +1 -1
- package/dist/character-count/character-count.css.map +1 -1
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/column/column.css +1 -1
- package/dist/column/column.css.map +1 -1
- package/dist/date-input/date-input.css +1 -1
- package/dist/date-input/date-input.css.map +1 -1
- package/dist/description-list/description-list.css +1 -1
- package/dist/description-list/description-list.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/error-message/error-message.css +1 -1
- package/dist/error-message/error-message.css.map +1 -1
- package/dist/field-set/field-set.css +1 -1
- package/dist/field-set/field-set.css.map +1 -1
- package/dist/figure/figure.css +1 -1
- package/dist/figure/figure.css.map +1 -1
- package/dist/file-input/file-input.css +1 -1
- package/dist/file-input/file-input.css.map +1 -1
- package/dist/file-list/file-list.css +1 -1
- package/dist/file-list/file-list.css.map +1 -1
- package/dist/footer/footer.css +1 -1
- package/dist/footer/footer.css.map +1 -1
- package/dist/gap/gap.css +1 -1
- package/dist/gap/gap.css.map +1 -1
- package/dist/grid/grid.css +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/header/header.css +1 -1
- package/dist/header/header.css.map +1 -1
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.css.map +1 -1
- package/dist/icon/icon.css +1 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/icon-button/icon-button.css +1 -1
- package/dist/icon-button/icon-button.css.map +1 -1
- package/dist/image-slider/image-slider.css +1 -1
- package/dist/image-slider/image-slider.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/invalid-form-alert/invalid-form-alert.css +1 -0
- package/dist/invalid-form-alert/invalid-form-alert.css.map +1 -0
- package/dist/label/label.css +1 -1
- package/dist/label/label.css.map +1 -1
- package/dist/link/link.css +1 -1
- package/dist/link/link.css.map +1 -1
- package/dist/link-list/link-list.css +1 -1
- package/dist/link-list/link-list.css.map +1 -1
- package/dist/margin/margin.css +1 -1
- package/dist/margin/margin.css.map +1 -1
- package/dist/ordered-list/ordered-list.css +1 -1
- package/dist/ordered-list/ordered-list.css.map +1 -1
- package/dist/page-heading/page-heading.css +1 -1
- package/dist/page-heading/page-heading.css.map +1 -1
- package/dist/page-menu/page-menu.css +1 -1
- package/dist/page-menu/page-menu.css.map +1 -1
- package/dist/pagination/pagination.css +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/paragraph/paragraph.css +1 -1
- package/dist/paragraph/paragraph.css.map +1 -1
- package/dist/password-input/password-input.css +1 -1
- package/dist/password-input/password-input.css.map +1 -1
- package/dist/radio/radio.css +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/row/row.css +1 -1
- package/dist/row/row.css.map +1 -1
- package/dist/search-field/search-field.css +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/select/select.css +1 -1
- package/dist/select/select.css.map +1 -1
- package/dist/spotlight/spotlight.css +1 -1
- package/dist/spotlight/spotlight.css.map +1 -1
- package/dist/switch/switch.css +1 -1
- package/dist/switch/switch.css.map +1 -1
- package/dist/table-of-contents/table-of-contents.css +1 -1
- package/dist/table-of-contents/table-of-contents.css.map +1 -1
- package/dist/tabs/tabs.css +1 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/text-area/text-area.css +1 -1
- package/dist/text-area/text-area.css.map +1 -1
- package/dist/text-input/text-input.css +1 -1
- package/dist/text-input/text-input.css.map +1 -1
- package/dist/time-input/time-input.css +1 -1
- package/dist/time-input/time-input.css.map +1 -1
- package/dist/top-task-link/top-task-link.css +1 -1
- package/dist/top-task-link/top-task-link.css.map +1 -1
- package/dist/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/package.json +4 -4
- package/src/common/hyphenation.scss +3 -3
- package/src/components/accordion/accordion.scss +5 -6
- package/src/components/action-group/README.md +1 -1
- package/src/components/action-group/action-group.scss +1 -1
- package/src/components/alert/README.md +13 -15
- package/src/components/alert/alert.scss +29 -14
- package/src/components/aspect-ratio/README.md +8 -8
- package/src/components/aspect-ratio/aspect-ratio.scss +6 -3
- package/src/components/avatar/README.md +5 -4
- package/src/components/avatar/avatar.scss +8 -46
- package/src/components/badge/README.md +7 -6
- package/src/components/badge/badge.scss +13 -40
- package/src/components/blockquote/blockquote.scss +1 -1
- package/src/components/breadcrumb/breadcrumb.scss +2 -0
- package/src/components/breakout/breakout.scss +4 -4
- package/src/components/button/README.md +1 -1
- package/src/components/button/button.scss +4 -1
- package/src/components/card/card.scss +19 -22
- package/src/components/character-count/character-count.scss +2 -0
- package/src/components/checkbox/checkbox.scss +6 -7
- package/src/components/column/column.scss +9 -8
- package/src/components/date-input/date-input.scss +3 -4
- package/src/components/description-list/description-list.scss +12 -10
- package/src/components/dialog/dialog.scss +17 -5
- package/src/components/error-message/error-message.scss +2 -0
- package/src/components/field-set/field-set.scss +1 -1
- package/src/components/figure/figure.scss +3 -1
- package/src/components/file-input/file-input.scss +2 -2
- package/src/components/file-list/file-list.scss +2 -1
- package/src/components/footer/README.md +3 -2
- package/src/components/footer/footer.scss +41 -2
- package/src/components/gap/README.md +13 -9
- package/src/components/gap/gap.scss +8 -12
- package/src/components/grid/_mixins.scss +14 -12
- package/src/components/header/README.md +1 -0
- package/src/components/header/header.scss +30 -18
- package/src/components/heading/README.md +7 -7
- package/src/components/heading/heading.scss +19 -19
- package/src/components/icon/README.md +5 -5
- package/src/components/icon/icon.scss +42 -29
- package/src/components/icon-button/icon-button.scss +16 -15
- package/src/components/image-slider/image-slider.scss +11 -3
- package/src/components/index.scss +1 -1
- package/src/components/{form-error-list → invalid-form-alert}/README.md +9 -9
- package/src/components/{form-error-list/form-error-list.scss → invalid-form-alert/invalid-form-alert.scss} +4 -4
- package/src/components/link/README.md +1 -2
- package/src/components/link/link.scss +9 -20
- package/src/components/link-list/link-list.scss +7 -8
- package/src/components/margin/README.md +16 -10
- package/src/components/margin/margin.scss +6 -8
- package/src/components/ordered-list/ordered-list.scss +3 -1
- package/src/components/page-heading/page-heading.scss +1 -1
- package/src/components/page-menu/page-menu.scss +0 -2
- package/src/components/pagination/pagination.scss +23 -34
- package/src/components/paragraph/paragraph.scss +3 -1
- package/src/components/password-input/password-input.scss +2 -3
- package/src/components/radio/radio.scss +4 -5
- package/src/components/row/row.scss +9 -9
- package/src/components/screen/README.md +6 -6
- package/src/components/search-field/search-field.scss +2 -3
- package/src/components/select/select.scss +2 -2
- package/src/components/spotlight/README.md +5 -2
- package/src/components/spotlight/spotlight.scss +6 -10
- package/src/components/switch/switch.scss +2 -2
- package/src/components/table-of-contents/table-of-contents.scss +2 -0
- package/src/components/tabs/tabs.scss +10 -3
- package/src/components/text-area/text-area.scss +1 -2
- package/src/components/text-input/text-input.scss +2 -3
- package/src/components/time-input/time-input.scss +3 -4
- package/src/components/top-task-link/top-task-link.scss +3 -3
- package/src/components/unordered-list/unordered-list.scss +3 -1
- package/dist/form-error-list/form-error-list.css +0 -1
- package/dist/form-error-list/form-error-list.css.map +0 -1
- package/src/common/size.scss +0 -14
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
@use "../../common/breakpoint" as *;
|
|
6
7
|
|
|
7
8
|
.ams-image-slider {
|
|
@@ -66,19 +67,26 @@
|
|
|
66
67
|
max-inline-size: 100%;
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
@mixin reset-button {
|
|
71
|
+
border: none;
|
|
72
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
73
|
+
padding-block: 0;
|
|
74
|
+
padding-inline: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
69
77
|
.ams-image-slider__thumbnail {
|
|
78
|
+
aspect-ratio: var(--ams-image-aspect-ratio); // Use the same default aspect ratio as the Image component
|
|
70
79
|
background-color: var(--ams-image-slider-thumbnails-thumbnail-background-color);
|
|
71
80
|
background-position: center;
|
|
72
81
|
background-size: cover;
|
|
73
|
-
border: none;
|
|
74
82
|
cursor: var(--ams-image-slider-thumbnails-thumbnail-cursor);
|
|
75
83
|
opacity: var(--ams-image-slider-thumbnails-thumbnail-opacity);
|
|
76
84
|
outline-offset: var(--ams-button-outline-offset);
|
|
77
|
-
padding-block: 0;
|
|
78
|
-
padding-inline: 0;
|
|
79
85
|
position: relative;
|
|
80
86
|
scroll-snap-align: start;
|
|
81
87
|
|
|
88
|
+
@include reset-button;
|
|
89
|
+
|
|
82
90
|
&:hover {
|
|
83
91
|
opacity: var(--ams-image-slider-thumbnails-thumbnail-hover-opacity);
|
|
84
92
|
}
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
@use "file-input/file-input";
|
|
30
30
|
@use "file-list/file-list";
|
|
31
31
|
@use "footer/footer";
|
|
32
|
-
@use "form-error-list/form-error-list";
|
|
33
32
|
@use "gap/gap";
|
|
34
33
|
@use "grid/grid";
|
|
35
34
|
@use "header/header";
|
|
@@ -39,6 +38,7 @@
|
|
|
39
38
|
@use "icon/icon";
|
|
40
39
|
@use "image-slider/image-slider";
|
|
41
40
|
@use "image/image";
|
|
41
|
+
@use "invalid-form-alert/invalid-form-alert";
|
|
42
42
|
@use "label/label";
|
|
43
43
|
@use "link-list/link-list";
|
|
44
44
|
@use "link/link";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
<!-- @license CC0-1.0 -->
|
|
2
2
|
|
|
3
|
-
# Form
|
|
3
|
+
# Invalid Form Alert
|
|
4
4
|
|
|
5
5
|
Use this component at the top of a page to summarise any errors a user has made.
|
|
6
|
-
When a user makes an error, you must show both a Form
|
|
6
|
+
When a user makes an error, you must show both a Invalid Form Alert and an Error Message above each answer that contains an error.
|
|
7
7
|
|
|
8
8
|
## Guidelines
|
|
9
9
|
|
|
10
|
-
- Always show
|
|
11
|
-
- You must link the errors in the Form
|
|
10
|
+
- Always show an Invalid Form Alert when there is a validation error, even if there’s only one.
|
|
11
|
+
- You must link the errors in the Invalid Form Alert to the answer they relate to (see below).
|
|
12
12
|
|
|
13
|
-
## Linking from the Form
|
|
13
|
+
## Linking from the Invalid Form Alert to each answer
|
|
14
14
|
|
|
15
|
-
For questions that require a user to answer using a single field, like a file upload, select, textarea
|
|
15
|
+
For questions that require a user to answer using a single field, like a file upload, select, textarea or text input, link to the `id` of that field.
|
|
16
16
|
|
|
17
17
|
When a user has to enter their answer into multiple fields, such as day, month and year fields, link to the `id` of the first field that contains an error.
|
|
18
18
|
If you do not know which field contains an error, link to the `id` of the first field.
|
|
19
19
|
|
|
20
20
|
For questions that require a user to select one or more options from a list using Radios or Checkboxes, link to the `id` of the first Radio or Checkbox.
|
|
21
21
|
|
|
22
|
-
## Where to put the Form
|
|
22
|
+
## Where to put the Invalid Form Alert
|
|
23
23
|
|
|
24
|
-
Put the Form
|
|
24
|
+
Put the Invalid Form Alert directly above the first question on the page. Place it outside of the `<form>`-tag, [to make sure screen readers do not skip it](https://nldesignsystem.nl/richtlijnen/formulieren/meerdere-stappen/#plaats-de-informatie-over-waar-de-gebruiker-is-in-de-stappen-boven-het-formulier).
|
|
25
25
|
|
|
26
26
|
## Error count in document title
|
|
27
27
|
|
|
@@ -39,7 +39,7 @@ Note: this functionality has been disabled on this page, to prevent unexpected f
|
|
|
39
39
|
|
|
40
40
|
Pay extra attention to these parts:
|
|
41
41
|
|
|
42
|
-
- [WCAG requirement 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships): the heading level of the Form
|
|
42
|
+
- [WCAG requirement 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships): the heading level of the Invalid Form Alert depends on where in the page it is placed, this may differ per page.
|
|
43
43
|
|
|
44
44
|
## References
|
|
45
45
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
.ams-form-
|
|
2
|
-
outline-offset: var(--ams-form-
|
|
1
|
+
.ams-invalid-form-alert {
|
|
2
|
+
outline-offset: var(--ams-invalid-form-alert-outline-offset);
|
|
3
3
|
|
|
4
4
|
// In Chromium browsers, the outline overlaps with the border in this component.
|
|
5
5
|
// We're not sure why, but to fix this we double the offset for Chromium browsers here.
|
|
6
6
|
@supports (contain: paint) and (not (-moz-appearance: none)) {
|
|
7
|
-
outline-offset: calc(var(--ams-form-
|
|
7
|
+
outline-offset: calc(var(--ams-invalid-form-alert-outline-offset) * 2);
|
|
8
8
|
|
|
9
9
|
// Reset for Safari
|
|
10
10
|
@supports (font: -apple-system-body) {
|
|
11
|
-
outline-offset: var(--ams-form-
|
|
11
|
+
outline-offset: var(--ams-invalid-form-alert-outline-offset);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -13,7 +13,7 @@ Use a link in the following cases:
|
|
|
13
13
|
- To navigate to another website (see [External links](#external-links))
|
|
14
14
|
- To navigate to an element on the same page
|
|
15
15
|
- To link to emails or phone numbers (start the link with `mailto:` or `tel:`)
|
|
16
|
-
- Wrap 2 or more consecutive buttons and/or links in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-
|
|
16
|
+
- Wrap 2 or more consecutive buttons and/or links in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-layout-action-group--docs).
|
|
17
17
|
|
|
18
18
|
A link is a navigation component.
|
|
19
19
|
Use a button instead of a link when an action is desired.
|
|
@@ -28,7 +28,6 @@ For more information: [Links to cross-origin destinations are unsafe](https://de
|
|
|
28
28
|
|
|
29
29
|
Visited links indicate that a user has already opened the link.
|
|
30
30
|
We discourage using styles for visited links because they often make the page less clear and navigation more challenging.
|
|
31
|
-
The inline link does have a visited style.
|
|
32
31
|
It is not part of navigation elements that are frequently scanned.
|
|
33
32
|
|
|
34
33
|
### Using links with routing libraries
|
|
@@ -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-link {
|
|
@@ -22,10 +23,11 @@
|
|
|
22
23
|
display: inline-block;
|
|
23
24
|
font-size: var(--ams-link-standalone-font-size);
|
|
24
25
|
line-height: var(--ams-link-standalone-line-height);
|
|
25
|
-
text-decoration-line: var(--ams-link-standalone-text-decoration-line);
|
|
26
26
|
text-decoration-thickness: var(--ams-link-standalone-text-decoration-thickness);
|
|
27
27
|
text-underline-offset: var(--ams-link-standalone-text-underline-offset);
|
|
28
28
|
|
|
29
|
+
@include hyphenation;
|
|
30
|
+
|
|
29
31
|
&:hover {
|
|
30
32
|
text-decoration-thickness: var(--ams-link-standalone-hover-text-decoration-thickness);
|
|
31
33
|
text-underline-offset: var(--ams-link-standalone-hover-text-underline-offset);
|
|
@@ -36,7 +38,6 @@
|
|
|
36
38
|
font-family: var(--ams-link-inline-font-family);
|
|
37
39
|
font-size: var(--ams-link-inline-font-size);
|
|
38
40
|
line-height: var(--ams-link-inline-line-height);
|
|
39
|
-
text-decoration-line: var(--ams-link-inline-text-decoration-line);
|
|
40
41
|
text-decoration-thickness: var(--ams-link-inline-text-decoration-thickness);
|
|
41
42
|
text-underline-offset: var(--ams-link-inline-text-underline-offset);
|
|
42
43
|
|
|
@@ -44,32 +45,20 @@
|
|
|
44
45
|
text-decoration-thickness: var(--ams-link-inline-hover-text-decoration-thickness);
|
|
45
46
|
text-underline-offset: var(--ams-link-inline-hover-text-underline-offset);
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
&:visited {
|
|
49
|
-
color: var(--ams-link-inline-visited-color);
|
|
50
|
-
}
|
|
51
48
|
}
|
|
52
49
|
|
|
53
|
-
.ams-link--contrast
|
|
54
|
-
color: var(--ams-link-contrast-color
|
|
50
|
+
.ams-link--contrast {
|
|
51
|
+
color: var(--ams-link-contrast-color);
|
|
55
52
|
|
|
56
53
|
&:hover {
|
|
57
|
-
color: var(--ams-link-contrast-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:visited {
|
|
61
|
-
color: var(--ams-link-contrast-color-visited-color);
|
|
54
|
+
color: var(--ams-link-contrast-hover-color);
|
|
62
55
|
}
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
.ams-link--inverse
|
|
66
|
-
color: var(--ams-link-inverse-color
|
|
58
|
+
.ams-link--inverse {
|
|
59
|
+
color: var(--ams-link-inverse-color);
|
|
67
60
|
|
|
68
61
|
&:hover {
|
|
69
|
-
color: var(--ams-link-inverse-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&:visited {
|
|
73
|
-
color: var(--ams-link-inverse-color-visited-color);
|
|
62
|
+
color: var(--ams-link-inverse-hover-color);
|
|
74
63
|
}
|
|
75
64
|
}
|
|
@@ -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
|
|
57
|
-
color: var(--ams-link-list-link-contrast-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-
|
|
59
|
+
color: var(--ams-link-list-link-contrast-hover-color);
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
.ams-link-list__link--inverse
|
|
65
|
-
color: var(--ams-link-list-link-inverse-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-
|
|
67
|
+
color: var(--ams-link-list-link-inverse-hover-color);
|
|
69
68
|
}
|
|
70
69
|
}
|
|
@@ -6,20 +6,26 @@ Adds white space below a single element.
|
|
|
6
6
|
|
|
7
7
|
## Class names
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Six options are available for the width or height of the bottom margin:
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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.
|
|
23
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
39
|
+
.ams-ordered-list--inverse:not(.ams-ordered-list--no-markers) {
|
|
38
40
|
color: var(--ams-ordered-list-inverse-color);
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
column-gap: var(--ams-page-menu-column-gap);
|
|
17
17
|
display: flex;
|
|
18
|
-
flex-direction: row;
|
|
19
18
|
flex-wrap: wrap;
|
|
20
19
|
list-style: none;
|
|
21
20
|
row-gap: var(--ams-page-menu-row-gap);
|
|
@@ -34,7 +33,6 @@
|
|
|
34
33
|
@mixin page-menu-item {
|
|
35
34
|
color: var(--ams-page-menu-item-color);
|
|
36
35
|
display: inline-flex;
|
|
37
|
-
flex-direction: row;
|
|
38
36
|
font-family: var(--ams-page-menu-item-font-family);
|
|
39
37
|
font-size: var(--ams-page-menu-item-font-size);
|
|
40
38
|
font-weight: var(--ams-page-menu-item-font-weight);
|
|
@@ -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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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-
|
|
56
|
-
text-decoration-line: var(--ams-pagination-
|
|
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-
|
|
67
|
-
|
|
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
|
|
36
|
+
.ams-paragraph--inverse {
|
|
35
37
|
color: var(--ams-paragraph-inverse-color);
|
|
36
38
|
}
|
|
@@ -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:
|
|
11
|
+
border: none;
|
|
12
12
|
border-radius: 0; // Reset rounded borders on iOS devices
|
|
13
13
|
margin-block: 0;
|
|
14
14
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
background-color: var(--ams-password-input-disabled-background-color);
|
|
46
46
|
box-shadow: var(--ams-password-input-disabled-box-shadow);
|
|
47
47
|
color: var(--ams-password-input-disabled-color);
|
|
48
|
-
cursor:
|
|
48
|
+
cursor: var(--ams-password-input-disabled-cursor);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ams-password-input:invalid,
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
box-shadow: var(--ams-password-input-invalid-box-shadow);
|
|
54
54
|
|
|
55
55
|
&:hover {
|
|
56
|
-
// TODO: this should be the (currently non-existent) dark red hover color
|
|
57
56
|
box-shadow: var(--ams-password-input-invalid-hover-box-shadow);
|
|
58
57
|
}
|
|
59
58
|
}
|
|
@@ -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-radio__input {
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
// Default
|
|
16
17
|
.ams-radio__label {
|
|
17
18
|
color: var(--ams-radio-color);
|
|
18
|
-
cursor:
|
|
19
|
+
cursor: var(--ams-radio-cursor);
|
|
19
20
|
display: inline-flex;
|
|
20
21
|
font-family: var(--ams-radio-font-family);
|
|
21
22
|
font-size: var(--ams-radio-font-size);
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
text-decoration-thickness: var(--ams-radio-text-decoration-thickness);
|
|
27
28
|
text-underline-offset: var(--ams-radio-text-underline-offset);
|
|
28
29
|
|
|
30
|
+
@include hyphenation;
|
|
29
31
|
@include text-rendering;
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -92,7 +94,7 @@
|
|
|
92
94
|
// Disabled
|
|
93
95
|
.ams-radio__input:disabled + .ams-radio__label {
|
|
94
96
|
color: var(--ams-radio-disabled-color);
|
|
95
|
-
cursor:
|
|
97
|
+
cursor: var(--ams-radio-disabled-cursor);
|
|
96
98
|
|
|
97
99
|
.ams-radio__circle {
|
|
98
100
|
stroke: var(--ams-radio-circle-disabled-stroke);
|
|
@@ -130,17 +132,14 @@
|
|
|
130
132
|
// Invalid hover
|
|
131
133
|
.ams-radio__input[aria-invalid="true"] + .ams-radio__label:hover {
|
|
132
134
|
.ams-radio__circle {
|
|
133
|
-
// TODO: this should be the (currently non-existent) dark red hover color
|
|
134
135
|
stroke: var(--ams-radio-circle-invalid-hover-stroke);
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
.ams-radio__hover-indicator {
|
|
138
|
-
// TODO: this should be the (currently non-existent) dark red hover color
|
|
139
139
|
stroke: var(--ams-radio-hover-indicator-invalid-hover-stroke);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.ams-radio__checked-indicator {
|
|
143
|
-
// TODO: this should be the (currently non-existent) dark red hover color
|
|
144
143
|
fill: var(--ams-radio-checked-indicator-invalid-hover-fill);
|
|
145
144
|
}
|
|
146
145
|
}
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@use "../../common/size" as *;
|
|
7
|
-
|
|
8
6
|
.ams-row {
|
|
9
7
|
display: flex;
|
|
10
|
-
|
|
11
|
-
gap: var(--ams-row-gap-md);
|
|
8
|
+
gap: var(--ams-row-gap-medium);
|
|
12
9
|
}
|
|
13
10
|
|
|
14
|
-
@each $size,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
11
|
+
@each $size in ("x-small", "small", "large", "x-large") {
|
|
12
|
+
.ams-row--gap-#{$size} {
|
|
13
|
+
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
|
14
|
+
gap: var(--ams-row-gap-#{$size});
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
17
|
|
|
18
|
+
.ams-row--gap-none {
|
|
19
|
+
gap: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
22
|
.ams-row--wrap {
|
|
23
23
|
flex-wrap: wrap;
|
|
24
24
|
}
|
|
@@ -8,12 +8,12 @@ Manages the maximum width and alignment of the entire website or application.
|
|
|
8
8
|
|
|
9
9
|
- This should be the outermost component of your website or application.
|
|
10
10
|
- Within it, combine components such as
|
|
11
|
-
[Grid](
|
|
12
|
-
[Header](
|
|
13
|
-
[Footer](
|
|
14
|
-
[Spotlight](
|
|
15
|
-
[Image Slider](
|
|
16
|
-
and Figure.
|
|
11
|
+
[Grid](https://designsystem.amsterdam/?path=/docs/components-layout-grid--docs),
|
|
12
|
+
[Header](https://designsystem.amsterdam/?path=/docs/components-containers-header--docs),
|
|
13
|
+
[Footer](https://designsystem.amsterdam/?path=/docs/components-containers-footer--docs),
|
|
14
|
+
[Spotlight](https://designsystem.amsterdam/?path=/docs/components-containers-spotlight--docs),
|
|
15
|
+
[Image Slider](https://designsystem.amsterdam/?path=/docs/components-media-image-slider--docs),
|
|
16
|
+
and [Figure](https://designsystem.amsterdam/?path=/docs/components-media-figure--docs).
|
|
17
17
|
|
|
18
18
|
## Design
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
@mixin reset-input {
|
|
14
14
|
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
15
15
|
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
16
|
-
border:
|
|
16
|
+
border: none;
|
|
17
17
|
border-radius: 0; // Reset rounded borders on iOS devices
|
|
18
18
|
margin-block: 0;
|
|
19
19
|
}
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
box-shadow: var(--ams-search-field-input-invalid-box-shadow);
|
|
51
51
|
|
|
52
52
|
&:hover {
|
|
53
|
-
// TODO: this should be the (currently non-existent) dark red hover color
|
|
54
53
|
box-shadow: var(--ams-search-field-input-invalid-hover-box-shadow);
|
|
55
54
|
}
|
|
56
55
|
}
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
appearance: none;
|
|
65
64
|
background-image: var(--ams-search-field-input-cancel-button-background-image);
|
|
66
65
|
block-size: var(--ams-search-field-input-cancel-button-block-size);
|
|
67
|
-
cursor:
|
|
66
|
+
cursor: var(--ams-search-field-input-cancel-button-cursor);
|
|
68
67
|
inline-size: var(--ams-search-field-input-cancel-button-inline-size);
|
|
69
68
|
margin-inline-start: 0.5rem;
|
|
70
69
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
@mixin reset-select {
|
|
7
7
|
appearance: none; // Reset native appearance to hide default chevron
|
|
8
|
-
border:
|
|
8
|
+
border: none;
|
|
9
9
|
border-radius: 0; // Reset rounded borders for Safari on MacOS
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
.ams-select:disabled {
|
|
46
46
|
box-shadow: var(--ams-select-disabled-box-shadow);
|
|
47
47
|
color: var(--ams-select-disabled-color);
|
|
48
|
-
cursor:
|
|
48
|
+
cursor: var(--ams-select-disabled-cursor);
|
|
49
49
|
|
|
50
50
|
&:not([multiple]) {
|
|
51
51
|
background-image: var(--ams-select-disabled-background-image);
|
|
@@ -8,8 +8,11 @@ Emphasizes a section on a page through a distinctive background colour.
|
|
|
8
8
|
|
|
9
9
|
- Display the Spotlight at the entire width of the [Screen](/docs/components-layout-screen--docs); do not position it on the [Grid](/docs/components-layout-grid--docs).
|
|
10
10
|
- Add a Grid with medium vertical padding inside the Spotlight to add whitespace around the content, even for a single element.
|
|
11
|
-
-
|
|
12
|
-
|
|
11
|
+
- Use any of the [highlight colours](/docs/brand-design-tokens-colour--docs) for the background.
|
|
12
|
+
The design system does not prescribe a meaning to any of these colours.
|
|
13
|
+
The default is purple.
|
|
14
|
+
- Use the default text colour (black) on an azure, lime, orange or yellow background.
|
|
15
|
+
Use the inverse text colour (white) on a green, magenta or purple background.
|
|
13
16
|
|
|
14
17
|
## Relevant WCAG requirements
|
|
15
18
|
|