@amsterdam/design-system-css 3.0.0 → 3.2.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 +26 -0
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.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/button/button.css +1 -1
- package/dist/button/button.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/document/document.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/heading/heading.css +1 -1
- package/dist/heading/heading.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/link-list/link-list.css +1 -1
- package/dist/link-list/link-list.css.map +1 -1
- package/dist/menu/menu.css +1 -1
- package/dist/menu/menu.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-footer/page-footer.css +1 -1
- package/dist/page-footer/page-footer.css.map +1 -1
- package/dist/page-header/page-header.css +1 -1
- package/dist/page-header/page-header.css.map +1 -1
- package/dist/page-heading/page-heading.deprecated.css +1 -1
- package/dist/page-heading/page-heading.deprecated.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/progress-list/progress-list.css +1 -0
- package/dist/progress-list/progress-list.css.map +1 -0
- 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/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/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/documentation/coding-conventions.md +6 -3
- package/package.json +4 -4
- package/src/common/resets.scss +106 -0
- package/src/components/accordion/accordion.scss +3 -10
- package/src/components/aspect-ratio/README.md +10 -8
- package/src/components/badge/badge.scss +2 -1
- package/src/components/blockquote/blockquote.scss +3 -6
- package/src/components/breadcrumb/breadcrumb.scss +3 -6
- package/src/components/button/button.scss +3 -8
- package/src/components/date-input/date-input.scss +18 -27
- package/src/components/description-list/README.md +1 -1
- package/src/components/description-list/description-list.scss +39 -17
- package/src/components/dialog/dialog.scss +5 -8
- package/src/components/document/document.scss +1 -4
- package/src/components/error-message/error-message.scss +4 -6
- package/src/components/field-set/field-set.scss +14 -34
- package/src/components/figure/figure.scss +3 -7
- package/src/components/file-input/file-input.scss +4 -8
- package/src/components/file-list/file-list.scss +3 -7
- package/src/components/heading/heading.scss +3 -5
- package/src/components/icon-button/icon-button.scss +3 -11
- package/src/components/image-slider/image-slider.scss +8 -19
- package/src/components/index.scss +1 -0
- package/src/components/link-list/link-list.scss +3 -7
- package/src/components/logo/README.md +0 -2
- package/src/components/menu/menu.scss +3 -7
- package/src/components/ordered-list/ordered-list.scss +4 -8
- package/src/components/page-footer/page-footer.scss +3 -7
- package/src/components/page-header/README.md +2 -1
- package/src/components/page-header/page-header.scss +30 -38
- package/src/components/page-heading/page-heading.deprecated.scss +3 -5
- package/src/components/pagination/pagination.scss +3 -8
- package/src/components/paragraph/paragraph.scss +4 -6
- package/src/components/password-input/password-input.scss +5 -14
- package/src/components/progress-list/README.md +14 -0
- package/src/components/progress-list/progress-list.scss +243 -0
- package/src/components/search-field/search-field.scss +5 -12
- package/src/components/select/select.scss +3 -6
- package/src/components/spotlight/README.md +7 -3
- package/src/components/table-of-contents/table-of-contents.scss +3 -7
- package/src/components/tabs/tabs.scss +4 -11
- package/src/components/text-area/text-area.scss +5 -14
- package/src/components/text-input/text-input.scss +5 -14
- package/src/components/time-input/time-input.scss +17 -24
- package/src/components/unordered-list/unordered-list.scss +3 -7
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin reset-body {
|
|
7
|
+
margin-block: 0;
|
|
8
|
+
margin-inline: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin reset-blockquote {
|
|
12
|
+
margin-block: 0;
|
|
13
|
+
margin-inline: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin reset-button {
|
|
17
|
+
border: none;
|
|
18
|
+
margin-block: 0; // [1]
|
|
19
|
+
margin-inline: 0; // [1]
|
|
20
|
+
padding-block: 0;
|
|
21
|
+
padding-inline: 0;
|
|
22
|
+
|
|
23
|
+
// [1] Remove the margin in older Safari.
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin reset-dd {
|
|
27
|
+
margin-inline: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin reset-dialog {
|
|
31
|
+
inset-block: 0;
|
|
32
|
+
padding-block: 0;
|
|
33
|
+
padding-inline: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin reset-dl {
|
|
37
|
+
margin-block: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin reset-fieldset {
|
|
41
|
+
border: none;
|
|
42
|
+
margin-inline: 0;
|
|
43
|
+
padding-block: 0;
|
|
44
|
+
padding-inline: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin reset-figure {
|
|
48
|
+
margin-block: 0;
|
|
49
|
+
margin-inline: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@mixin reset-hx {
|
|
53
|
+
margin-block: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin reset-input {
|
|
57
|
+
appearance: none; // Reset native appearance on iOS and Android devices
|
|
58
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
59
|
+
margin-block: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin reset-legend {
|
|
63
|
+
/* stylelint-disable-next-line csstools/use-logical */
|
|
64
|
+
float: left; // [1]
|
|
65
|
+
inline-size: 100%; // [1]
|
|
66
|
+
padding-inline: 0;
|
|
67
|
+
|
|
68
|
+
+ * {
|
|
69
|
+
clear: both; // [2]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// [1] This combination allows the fieldset border to go around the legend, instead of through it.
|
|
73
|
+
// The actual value for float is not important, a legend should never have elements that wrap around it.
|
|
74
|
+
// [2] Reset the applied float for the legend’s first sibling.
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@mixin reset-ol {
|
|
78
|
+
list-style: none;
|
|
79
|
+
margin-block: 0;
|
|
80
|
+
padding-inline-start: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin reset-p {
|
|
84
|
+
margin-block: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@mixin reset-placeholder {
|
|
88
|
+
opacity: 100%; // Reset lower opacity set by Firefox
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@mixin reset-select {
|
|
92
|
+
appearance: none; // Reset native appearance to hide default chevron
|
|
93
|
+
border-radius: 0; // Reset rounded borders for Safari on macOS
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@mixin reset-textarea {
|
|
97
|
+
appearance: none; // Reset native appearance on iOS and Android devices
|
|
98
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
99
|
+
margin-block: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@mixin reset-ul {
|
|
103
|
+
list-style: none;
|
|
104
|
+
margin-block: 0;
|
|
105
|
+
padding-inline-start: 0;
|
|
106
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
10
|
.ams-accordion {
|
|
@@ -19,15 +20,9 @@
|
|
|
19
20
|
/* This class name is deprecated. */
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
@mixin reset-button {
|
|
23
|
-
border: none;
|
|
24
|
-
margin-block: 0; // [1]
|
|
25
|
-
margin-inline: 0; // [1]
|
|
26
|
-
|
|
27
|
-
// [1] Remove the margin in older Safari.
|
|
28
|
-
}
|
|
29
|
-
|
|
30
23
|
.ams-accordion__button {
|
|
24
|
+
@include reset-button;
|
|
25
|
+
|
|
31
26
|
background-color: transparent;
|
|
32
27
|
color: var(--ams-accordion-button-color);
|
|
33
28
|
cursor: var(--ams-accordion-button-cursor);
|
|
@@ -43,8 +38,6 @@
|
|
|
43
38
|
padding-inline: var(--ams-accordion-button-padding-inline);
|
|
44
39
|
text-align: start;
|
|
45
40
|
|
|
46
|
-
@include reset-button;
|
|
47
|
-
|
|
48
41
|
&:hover {
|
|
49
42
|
color: var(--ams-accordion-button-hover-color);
|
|
50
43
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<!-- @license CC0-1.0 -->
|
|
2
2
|
|
|
3
|
+
import { SpaceSample } from "../../docs/components/SpaceSample";
|
|
4
|
+
|
|
3
5
|
# Aspect Ratio
|
|
4
6
|
|
|
5
7
|
Constrains media content to a supported aspect ratio.
|
|
@@ -9,14 +11,14 @@ Constrains media content to a supported aspect ratio.
|
|
|
9
11
|
Each available aspect ratio has an associated class name.
|
|
10
12
|
The class can be applied to any component or element.
|
|
11
13
|
|
|
12
|
-
| Class name | Example
|
|
13
|
-
| :---------------------- |
|
|
14
|
-
| `ams-aspect-ratio-9-16` | <
|
|
15
|
-
| `ams-aspect-ratio-3-4` | <
|
|
16
|
-
| `ams-aspect-ratio-1-1` | <
|
|
17
|
-
| `ams-aspect-ratio-4-3` | <
|
|
18
|
-
| `ams-aspect-ratio-16-9` | <
|
|
19
|
-
| `ams-aspect-ratio-16-5` | <
|
|
14
|
+
| Class name | Example |
|
|
15
|
+
| :---------------------- | :------------------------------------------------ |
|
|
16
|
+
| `ams-aspect-ratio-9-16` | <SpaceSample className="ams-aspect-ratio-9-16" /> |
|
|
17
|
+
| `ams-aspect-ratio-3-4` | <SpaceSample className="ams-aspect-ratio-3-4" /> |
|
|
18
|
+
| `ams-aspect-ratio-1-1` | <SpaceSample className="ams-aspect-ratio-1-1" /> |
|
|
19
|
+
| `ams-aspect-ratio-4-3` | <SpaceSample className="ams-aspect-ratio-4-3" /> |
|
|
20
|
+
| `ams-aspect-ratio-16-9` | <SpaceSample className="ams-aspect-ratio-16-9" /> |
|
|
21
|
+
| `ams-aspect-ratio-16-5` | <SpaceSample className="ams-aspect-ratio-16-5" /> |
|
|
20
22
|
|
|
21
23
|
## Guidelines
|
|
22
24
|
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
.ams-badge {
|
|
10
10
|
background-color: var(--ams-badge-background-color);
|
|
11
11
|
color: var(--ams-badge-color);
|
|
12
|
-
display: inline-
|
|
12
|
+
display: inline-flex;
|
|
13
13
|
font-family: var(--ams-badge-font-family);
|
|
14
14
|
font-size: var(--ams-badge-font-size);
|
|
15
15
|
font-weight: var(--ams-badge-font-weight);
|
|
16
|
+
gap: var(--ams-badge-gap);
|
|
16
17
|
line-height: var(--ams-badge-line-height);
|
|
17
18
|
padding-inline: var(--ams-badge-padding-inline);
|
|
18
19
|
|
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
|
-
@mixin reset-blockquote {
|
|
10
|
-
margin-block: 0;
|
|
11
|
-
margin-inline: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
.ams-blockquote {
|
|
11
|
+
@include reset-blockquote;
|
|
12
|
+
|
|
15
13
|
box-sizing: border-box;
|
|
16
14
|
break-inside: avoid;
|
|
17
15
|
color: var(--ams-blockquote-color);
|
|
@@ -23,7 +21,6 @@
|
|
|
23
21
|
|
|
24
22
|
@include hyphenation;
|
|
25
23
|
@include text-rendering;
|
|
26
|
-
@include reset-blockquote;
|
|
27
24
|
|
|
28
25
|
&::before {
|
|
29
26
|
content: open-quote;
|
|
@@ -4,13 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
|
-
@mixin reset-ol {
|
|
10
|
-
margin-block: 0;
|
|
11
|
-
padding-inline: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
.ams-breadcrumb {
|
|
15
11
|
/*
|
|
16
12
|
* If break-after is supported, use it to avoid Breadcrumbs from being the last item on a page when printed.
|
|
@@ -25,12 +21,13 @@
|
|
|
25
21
|
}
|
|
26
22
|
|
|
27
23
|
.ams-breadcrumb__list {
|
|
24
|
+
@include reset-ol;
|
|
25
|
+
|
|
28
26
|
box-sizing: border-box;
|
|
29
27
|
break-inside: avoid;
|
|
30
28
|
|
|
31
29
|
@include hyphenation;
|
|
32
30
|
@include text-rendering;
|
|
33
|
-
@include reset-ol;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
.ams-breadcrumb__item {
|
|
@@ -4,19 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
|
-
@mixin reset-button {
|
|
10
|
-
margin-block: 0; // [1]
|
|
11
|
-
margin-inline: 0; // [1]
|
|
12
|
-
|
|
13
|
-
// [1] Remove the margin in older Safari.
|
|
14
|
-
}
|
|
15
|
-
|
|
16
10
|
.ams-button {
|
|
17
11
|
// Override line height for Icon in Button.
|
|
18
12
|
--ams-icon-line-height: var(--ams-button-line-height);
|
|
19
13
|
|
|
14
|
+
@include reset-button;
|
|
15
|
+
|
|
20
16
|
border-style: var(--ams-button-border-style);
|
|
21
17
|
border-width: var(--ams-button-border-width);
|
|
22
18
|
cursor: var(--ams-button-cursor);
|
|
@@ -34,7 +30,6 @@
|
|
|
34
30
|
|
|
35
31
|
@include hyphenation;
|
|
36
32
|
@include text-rendering;
|
|
37
|
-
@include reset-button;
|
|
38
33
|
|
|
39
34
|
&:disabled,
|
|
40
35
|
&[aria-disabled="true"] {
|
|
@@ -3,30 +3,12 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use "../../common/resets" as *;
|
|
6
7
|
@use "../../common/text-rendering" as *;
|
|
7
8
|
|
|
8
|
-
@mixin reset-input {
|
|
9
|
-
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
10
|
-
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
11
|
-
border-radius: 0; // Reset rounded borders on iOS devices
|
|
12
|
-
margin-block: 0;
|
|
13
|
-
|
|
14
|
-
&::-webkit-datetime-edit,
|
|
15
|
-
&::-webkit-datetime-edit-ampm-field,
|
|
16
|
-
&::-webkit-datetime-edit-day-field,
|
|
17
|
-
&::-webkit-datetime-edit-fields-wrapper,
|
|
18
|
-
&::-webkit-datetime-edit-hour-field,
|
|
19
|
-
&::-webkit-datetime-edit-millisecond-field,
|
|
20
|
-
&::-webkit-datetime-edit-minute-field,
|
|
21
|
-
&::-webkit-datetime-edit-month-field,
|
|
22
|
-
&::-webkit-datetime-edit-second-field,
|
|
23
|
-
&::-webkit-datetime-edit-week-field,
|
|
24
|
-
&::-webkit-datetime-edit-year-field {
|
|
25
|
-
padding-block: 0; // Override value of 1px in UA stylesheet
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
9
|
.ams-date-input {
|
|
10
|
+
@include reset-input;
|
|
11
|
+
|
|
30
12
|
background-color: var(--ams-date-input-background-color);
|
|
31
13
|
border-color: var(--ams-date-input-border-color);
|
|
32
14
|
border-style: var(--ams-date-input-border-style);
|
|
@@ -51,7 +33,21 @@
|
|
|
51
33
|
touch-action: manipulation;
|
|
52
34
|
|
|
53
35
|
@include text-rendering;
|
|
54
|
-
|
|
36
|
+
|
|
37
|
+
// Reset padding on webkit date edit fields to override the value of 1px in the UA stylesheet.
|
|
38
|
+
&::-webkit-datetime-edit,
|
|
39
|
+
&::-webkit-datetime-edit-ampm-field,
|
|
40
|
+
&::-webkit-datetime-edit-day-field,
|
|
41
|
+
&::-webkit-datetime-edit-fields-wrapper,
|
|
42
|
+
&::-webkit-datetime-edit-hour-field,
|
|
43
|
+
&::-webkit-datetime-edit-millisecond-field,
|
|
44
|
+
&::-webkit-datetime-edit-minute-field,
|
|
45
|
+
&::-webkit-datetime-edit-month-field,
|
|
46
|
+
&::-webkit-datetime-edit-second-field,
|
|
47
|
+
&::-webkit-datetime-edit-week-field,
|
|
48
|
+
&::-webkit-datetime-edit-year-field {
|
|
49
|
+
padding-block: 0;
|
|
50
|
+
}
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
// This changes the default calendar icon on Chromium browsers only
|
|
@@ -70,11 +66,6 @@
|
|
|
70
66
|
cursor: var(--ams-date-input-disabled-cursor);
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
.ams-date-input:disabled::-webkit-calendar-picker-indicator {
|
|
74
|
-
background-image: var(--ams-date-input-disabled-calendar-picker-indicator-background-image);
|
|
75
|
-
visibility: visible;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
69
|
.ams-date-input:not(:disabled):invalid,
|
|
79
70
|
.ams-date-input:not(:disabled)[aria-invalid="true"] {
|
|
80
71
|
border-color: var(--ams-date-input-invalid-border-color);
|
|
@@ -6,7 +6,7 @@ A collection of terms and their descriptions.
|
|
|
6
6
|
|
|
7
7
|
## Design
|
|
8
8
|
|
|
9
|
-
In a narrow window, descriptions appear
|
|
9
|
+
In a narrow window, descriptions appear below their term.
|
|
10
10
|
After that, they display in a two-column layout.
|
|
11
11
|
The column for the terms is as wide as the longest term, without wrapping.
|
|
12
12
|
Its width can be adjusted to be ‘large’ (50%), ‘medium’ (33%), or ‘small’ (20%), which also allows the terms to wrap.
|
|
@@ -5,27 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
@use "../../common/breakpoint" as *;
|
|
7
7
|
@use "../../common/hyphenation" as *;
|
|
8
|
+
@use "../../common/resets" as *;
|
|
8
9
|
@use "../../common/text-rendering" as *;
|
|
9
10
|
|
|
10
|
-
@mixin reset-dl {
|
|
11
|
-
margin-block: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin reset-dd {
|
|
15
|
-
margin-inline: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
11
|
.ams-description-list {
|
|
19
|
-
|
|
12
|
+
@include reset-dl;
|
|
13
|
+
|
|
20
14
|
color: var(--ams-description-list-color);
|
|
21
|
-
column-gap: var(--ams-description-list-column-gap);
|
|
22
|
-
display: grid;
|
|
23
15
|
font-family: var(--ams-description-list-font-family);
|
|
24
16
|
font-size: var(--ams-description-list-font-size);
|
|
25
17
|
line-height: var(--ams-description-list-line-height);
|
|
26
|
-
row-gap: var(--ams-description-list-row-gap);
|
|
27
18
|
|
|
28
|
-
@include reset-dl;
|
|
29
19
|
@include hyphenation;
|
|
30
20
|
@include text-rendering;
|
|
31
21
|
}
|
|
@@ -33,6 +23,9 @@
|
|
|
33
23
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
34
24
|
.ams-description-list,
|
|
35
25
|
.ams-description-list__section {
|
|
26
|
+
align-items: start;
|
|
27
|
+
column-gap: var(--ams-description-list-column-gap);
|
|
28
|
+
display: grid;
|
|
36
29
|
grid-template-columns: auto 1fr;
|
|
37
30
|
}
|
|
38
31
|
|
|
@@ -58,32 +51,61 @@
|
|
|
58
51
|
|
|
59
52
|
.ams-description-list__term {
|
|
60
53
|
font-weight: var(--ams-description-list-term-font-weight);
|
|
54
|
+
margin-block-end: var(--ams-description-list-term-margin-block-end);
|
|
55
|
+
|
|
56
|
+
// Remove whitespace between consecutive Terms
|
|
57
|
+
/* stylelint-disable-next-line plugin/use-baseline -- Suboptimal spacing in non-supporting browsers is acceptable */
|
|
58
|
+
&:has(+ .ams-description-list__term) {
|
|
59
|
+
margin-block-end: 0;
|
|
60
|
+
}
|
|
61
61
|
|
|
62
62
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
63
|
+
// Make sure all Terms are in the second column
|
|
63
64
|
grid-column-start: 1;
|
|
65
|
+
|
|
66
|
+
// Depend on Descriptions for vertical spacing
|
|
67
|
+
margin-block-end: 0;
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
.ams-description-list__section {
|
|
72
|
+
margin-block-end: var(--ams-description-list-section-margin-block-end);
|
|
73
|
+
|
|
68
74
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
69
|
-
|
|
70
|
-
display: grid;
|
|
75
|
+
// Let a Section span both columns of the parent List
|
|
71
76
|
grid-column: span 2;
|
|
72
77
|
|
|
73
78
|
> :only-of-type {
|
|
79
|
+
// Vertically stretch a single Term or Description
|
|
74
80
|
grid-row: 1 / 9;
|
|
75
81
|
}
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
.ams-description-list__description {
|
|
86
|
+
@include reset-dd;
|
|
87
|
+
|
|
80
88
|
font-weight: var(--ams-description-list-description-font-weight);
|
|
89
|
+
margin-block-end: var(--ams-description-list-description-margin-block-end);
|
|
81
90
|
padding-inline-start: var(--ams-description-list-description-padding-inline-start);
|
|
82
91
|
|
|
83
|
-
@include reset-dd;
|
|
84
|
-
|
|
85
92
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
93
|
+
// Make sure all Descriptions are in the second column
|
|
86
94
|
grid-column-start: 2;
|
|
95
|
+
|
|
96
|
+
// Remove indentation in 2-column layout
|
|
87
97
|
padding-inline-start: 0;
|
|
88
98
|
}
|
|
89
99
|
}
|
|
100
|
+
|
|
101
|
+
// Remove trailing margins
|
|
102
|
+
/* stylelint-disable-next-line no-duplicate-selectors -- Natural reading order, prevents descending specificity */
|
|
103
|
+
.ams-description-list {
|
|
104
|
+
> .ams-description-list__term:last-child,
|
|
105
|
+
> .ams-description-list__description:last-child,
|
|
106
|
+
> .ams-description-list__section:last-child,
|
|
107
|
+
> .ams-description-list__section:last-child > .ams-description-list__term:last-child,
|
|
108
|
+
> .ams-description-list__section:last-child > .ams-description-list__description:last-child {
|
|
109
|
+
margin-block-end: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -4,20 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/breakpoint" as *;
|
|
7
|
-
|
|
8
|
-
@mixin reset-dialog {
|
|
9
|
-
inset-block: 0;
|
|
10
|
-
padding-block: 0;
|
|
11
|
-
padding-inline: 0;
|
|
12
|
-
}
|
|
7
|
+
@use "../../common/resets" as *;
|
|
13
8
|
|
|
14
9
|
/* A dialog must have `display: none` until the `open` attribute is set,
|
|
15
10
|
so do not apply these styles without an `open` attribute. */
|
|
16
11
|
.ams-dialog:not(dialog:not([open])) {
|
|
12
|
+
@include reset-dialog;
|
|
13
|
+
|
|
17
14
|
background-color: var(--ams-dialog-background-color);
|
|
18
15
|
border-color: var(--ams-dialog-border-color);
|
|
16
|
+
border-radius: var(--ams-dialog-border-radius);
|
|
19
17
|
border-style: var(--ams-dialog-border-style);
|
|
20
18
|
border-width: var(--ams-dialog-border-width);
|
|
19
|
+
box-shadow: var(--ams-dialog-box-shadow);
|
|
21
20
|
box-sizing: border-box;
|
|
22
21
|
display: flex; // We’d like to use CSS Grid here, but that doesn’t work as expected in Safari.
|
|
23
22
|
flex-direction: column;
|
|
@@ -26,8 +25,6 @@ so do not apply these styles without an `open` attribute. */
|
|
|
26
25
|
max-block-size: var(--ams-dialog-max-block-size);
|
|
27
26
|
max-inline-size: var(--ams-dialog-max-inline-size);
|
|
28
27
|
|
|
29
|
-
@include reset-dialog;
|
|
30
|
-
|
|
31
28
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
32
29
|
inline-size: var(--ams-dialog-medium-inline-size);
|
|
33
30
|
max-block-size: var(--ams-dialog-medium-max-block-size);
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
|
-
@mixin reset-p {
|
|
10
|
-
margin-block: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
10
|
.ams-error-message {
|
|
11
|
+
@include reset-p;
|
|
12
|
+
|
|
14
13
|
box-sizing: border-box;
|
|
15
14
|
color: var(--ams-error-message-color);
|
|
16
|
-
display:
|
|
15
|
+
display: flex;
|
|
17
16
|
font-family: var(--ams-error-message-font-family);
|
|
18
17
|
font-size: var(--ams-error-message-font-size);
|
|
19
18
|
font-weight: var(--ams-error-message-font-weight);
|
|
@@ -22,5 +21,4 @@
|
|
|
22
21
|
|
|
23
22
|
@include hyphenation;
|
|
24
23
|
@include text-rendering;
|
|
25
|
-
@include reset-p;
|
|
26
24
|
}
|
|
@@ -4,63 +4,49 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
|
-
@mixin reset-fieldset {
|
|
10
|
-
border: none;
|
|
11
|
-
margin-inline: 0;
|
|
12
|
-
padding-block: 0;
|
|
13
|
-
padding-inline: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
10
|
.ams-field-set {
|
|
17
|
-
break-inside: avoid;
|
|
18
|
-
|
|
19
11
|
@include reset-fieldset;
|
|
12
|
+
|
|
13
|
+
break-inside: avoid;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
// Default margin between all direct children of
|
|
16
|
+
// Default margin between all direct children of Field Set
|
|
17
|
+
// We can’t use grid or flex display and a gap because of a bug in Chrome.
|
|
23
18
|
.ams-field-set > :not(:last-child) {
|
|
24
|
-
margin-block-end: var(--ams-field-set-child-margin-block-end);
|
|
19
|
+
margin-block-end: var(--ams-field-set-child-margin-block-end);
|
|
25
20
|
}
|
|
26
21
|
|
|
22
|
+
/* stylelint-disable plugin/use-baseline -- Without support for `:has`, all elements have the same spacing, which is acceptable. */
|
|
23
|
+
|
|
27
24
|
// We use :has here to increase the margin before the error message.
|
|
28
|
-
// If :has is not supported, all elements will have the default gap defined above, which is acceptable.
|
|
29
|
-
/* stylelint-disable-next-line plugin/use-baseline */
|
|
30
25
|
.ams-field-set > :has(+ .ams-error-message) {
|
|
31
26
|
margin-block-end: var(--ams-field-set-child-before-error-message-margin-block-end);
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
// If a
|
|
35
|
-
/* stylelint-disable-next-line plugin/use-baseline */
|
|
29
|
+
// If a Field Set contains a Field or another Field Set, increase the margin of the preceding element.
|
|
36
30
|
.ams-field-set > :has(+ .ams-field),
|
|
37
31
|
.ams-field-set > :has(+ .ams-field-set) {
|
|
38
32
|
margin-block-end: var(--ams-field-set-child-before-field-or-field-set-margin-block-end);
|
|
39
33
|
}
|
|
40
34
|
|
|
41
|
-
// If a
|
|
42
|
-
/* stylelint-disable-next-line plugin/use-baseline */
|
|
35
|
+
// If a Field Set contains multiple Fields or Field Sets, increase the margin between them.
|
|
43
36
|
.ams-field-set > :is(.ams-field, .ams-field-set):has(+ :is(.ams-field, .ams-field-set)) {
|
|
44
37
|
margin-block-end: var(--ams-field-set-child-between-fields-and-field-sets-margin-block-end);
|
|
45
38
|
}
|
|
46
39
|
|
|
40
|
+
/* stylelint-enable plugin/use-baseline */
|
|
41
|
+
|
|
47
42
|
.ams-field-set--invalid {
|
|
48
43
|
border-inline-start: var(--ams-field-set-invalid-border-inline-start);
|
|
49
44
|
padding-inline-start: var(--ams-field-set-invalid-padding-inline-start);
|
|
50
45
|
}
|
|
51
46
|
|
|
52
|
-
@mixin reset-legend {
|
|
53
|
-
/* stylelint-disable-next-line csstools/use-logical */
|
|
54
|
-
float: left; // [1]
|
|
55
|
-
inline-size: 100%; // [1]
|
|
56
|
-
padding-inline: 0;
|
|
57
|
-
|
|
58
|
-
+ * {
|
|
59
|
-
clear: both; // [2]
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
47
|
.ams-field-set__legend {
|
|
48
|
+
@include reset-legend;
|
|
49
|
+
|
|
64
50
|
color: var(--ams-field-set-legend-color);
|
|
65
51
|
font-family: var(--ams-field-set-legend-font-family);
|
|
66
52
|
font-size: var(--ams-field-set-legend-font-size);
|
|
@@ -76,7 +62,6 @@
|
|
|
76
62
|
|
|
77
63
|
@include hyphenation;
|
|
78
64
|
@include text-rendering;
|
|
79
|
-
@include reset-legend;
|
|
80
65
|
}
|
|
81
66
|
|
|
82
67
|
.ams-field-set__legend--in-fieldset {
|
|
@@ -88,8 +73,3 @@
|
|
|
88
73
|
font-weight: inherit;
|
|
89
74
|
margin-block: 0;
|
|
90
75
|
}
|
|
91
|
-
|
|
92
|
-
// [1] This combination allows the fieldset border to go around the legend, instead of through it.
|
|
93
|
-
// The actual value for float is not important, a legend should never have elements that wrap around it.
|
|
94
|
-
// [2] Reset the applied float for the legend’s first sibling.
|
|
95
|
-
// [3] We can’t use grid or flex display and a gap because of a bug in Chrome.
|
|
@@ -4,19 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/resets" as *;
|
|
7
8
|
@use "../../common/text-rendering" as *;
|
|
8
9
|
|
|
9
|
-
@mixin reset-figure {
|
|
10
|
-
margin-block: 0;
|
|
11
|
-
margin-inline: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
.ams-figure {
|
|
11
|
+
@include reset-figure;
|
|
12
|
+
|
|
15
13
|
display: flex;
|
|
16
14
|
flex-direction: column;
|
|
17
15
|
gap: var(--ams-figure-gap);
|
|
18
|
-
|
|
19
|
-
@include reset-figure;
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
.ams-figure__caption {
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use "../../common/resets" as *;
|
|
6
7
|
@use "../../common/text-rendering" as *;
|
|
7
8
|
|
|
8
|
-
@mixin reset-button {
|
|
9
|
-
border-radius: 0; // Reset rounded borders on iOS devices
|
|
10
|
-
}
|
|
11
|
-
|
|
12
9
|
.ams-file-input {
|
|
13
10
|
background-color: var(--ams-file-input-background-color);
|
|
14
11
|
border-color: var(--ams-file-input-border-color);
|
|
@@ -36,8 +33,9 @@
|
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
.ams-file-input::file-selector-button {
|
|
39
|
-
-
|
|
40
|
-
|
|
36
|
+
@include reset-button;
|
|
37
|
+
|
|
38
|
+
appearance: none; // Reset native appearance on iOS and Android devices
|
|
41
39
|
background-color: var(--ams-file-input-file-selector-button-background-color);
|
|
42
40
|
border-color: var(--ams-file-input-file-selector-button-border-color);
|
|
43
41
|
border-style: var(--ams-file-input-file-selector-button-border-style);
|
|
@@ -52,8 +50,6 @@
|
|
|
52
50
|
margin-inline-end: var(--ams-file-input-file-selector-button-margin-inline-end);
|
|
53
51
|
padding-block: var(--ams-file-input-file-selector-button-padding-block);
|
|
54
52
|
padding-inline: var(--ams-file-input-file-selector-button-padding-inline);
|
|
55
|
-
|
|
56
|
-
@include reset-button;
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
.ams-file-input:disabled::file-selector-button {
|