@amsterdam/design-system-css 0.7.1 → 0.9.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 +64 -0
- package/README.md +21 -0
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.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/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/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/date-input/date-input.css +1 -0
- package/dist/date-input/date-input.css.map +1 -0
- package/dist/description-list/description-list.css +1 -0
- package/dist/description-list/description-list.css.map +1 -0
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/document/document.css +1 -0
- package/dist/document/document.css.map +1 -0
- package/dist/error-message/error-message.css +1 -0
- package/dist/error-message/error-message.css.map +1 -0
- package/dist/field/field.css +1 -0
- package/dist/field/field.css.map +1 -0
- package/dist/field-set/field-set.css +1 -0
- package/dist/field-set/field-set.css.map +1 -0
- package/dist/file-input/file-input.css +1 -0
- package/dist/file-input/file-input.css.map +1 -0
- package/dist/form-field-character-counter/form-field-character-counter.css +1 -1
- package/dist/form-field-character-counter/form-field-character-counter.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/image/image.css +1 -1
- package/dist/image/image.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/label/label.css +1 -0
- package/dist/label/label.css.map +1 -0
- 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/logo/logo.css +1 -1
- package/dist/logo/logo.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/radio/radio.css +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/screen/screen.css +1 -1
- package/dist/screen/screen.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 -0
- package/dist/select/select.css.map +1 -0
- package/dist/switch/switch.css +1 -1
- package/dist/switch/switch.css.map +1 -1
- package/dist/table/table.css +1 -1
- package/dist/table/table.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 -0
- package/dist/time-input/time-input.css.map +1 -0
- 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/dist/visually-hidden/visually-hidden.css +1 -1
- package/dist/visually-hidden/visually-hidden.css.map +1 -1
- package/documentation/coding-conventions.md +16 -4
- package/package.json +5 -5
- package/src/common/hide-input.scss +1 -1
- package/src/common/text-rendering.scss +15 -0
- package/src/components/accordion/accordion.scss +23 -15
- package/src/components/avatar/avatar.scss +2 -2
- package/src/components/badge/badge.scss +35 -5
- package/src/components/blockquote/blockquote.scss +2 -1
- package/src/components/breadcrumb/breadcrumb.scss +12 -10
- package/src/components/button/button.scss +8 -5
- package/src/components/card/card.scss +1 -1
- package/src/components/checkbox/checkbox.scss +12 -15
- package/src/components/date-input/README.md +11 -0
- package/src/components/date-input/date-input.scss +77 -0
- package/src/components/description-list/README.md +18 -0
- package/src/components/description-list/description-list.scss +55 -0
- package/src/components/dialog/README.md +7 -0
- package/src/components/dialog/dialog.scss +7 -7
- package/src/components/document/document.scss +14 -0
- package/src/components/error-message/README.md +11 -0
- package/src/components/error-message/error-message.scss +22 -0
- package/src/components/field/README.md +9 -0
- package/src/components/field/field.scss +16 -0
- package/src/components/field-set/README.md +17 -0
- package/src/components/field-set/field-set.scss +48 -0
- package/src/components/file-input/README.md +9 -0
- package/src/components/file-input/file-input.scss +69 -0
- package/src/components/form-field-character-counter/form-field-character-counter.scss +2 -4
- package/src/components/header/header.scss +5 -5
- package/src/components/heading/heading.scss +2 -1
- package/src/components/icon/icon.scss +12 -12
- package/src/components/image/image.scss +3 -3
- package/src/components/index.scss +10 -2
- package/src/components/{form-label → label}/README.md +1 -1
- package/src/components/label/label.scss +18 -0
- package/src/components/link/link.scss +2 -4
- package/src/components/link-list/link-list.scss +6 -5
- package/src/components/logo/logo.scss +1 -1
- package/src/components/ordered-list/ordered-list.scss +10 -3
- package/src/components/page-heading/page-heading.scss +2 -1
- package/src/components/page-menu/page-menu.scss +8 -1
- package/src/components/pagination/README.md +1 -0
- package/src/components/pagination/pagination.scss +10 -7
- package/src/components/paragraph/paragraph.scss +5 -3
- package/src/components/radio/radio.scss +9 -12
- package/src/components/screen/screen.scss +8 -3
- package/src/components/search-field/search-field.scss +34 -8
- package/src/components/select/README.md +9 -0
- package/src/components/select/select.scss +62 -0
- package/src/components/switch/switch.scss +12 -9
- package/src/components/table/table.scss +1 -1
- package/src/components/tabs/tabs.scss +9 -3
- package/src/components/text-area/text-area.scss +13 -6
- package/src/components/text-input/text-input.scss +10 -3
- package/src/components/time-input/README.md +11 -0
- package/src/components/time-input/time-input.scss +78 -0
- package/src/components/top-task-link/top-task-link.scss +2 -1
- package/src/components/unordered-list/unordered-list.scss +10 -3
- package/src/components/visually-hidden/visually-hidden.scss +2 -2
- package/dist/fieldset/fieldset.css +0 -1
- package/dist/fieldset/fieldset.css.map +0 -1
- package/dist/form-label/form-label.css +0 -1
- package/dist/form-label/form-label.css.map +0 -1
- package/src/components/fieldset/README.md +0 -18
- package/src/components/fieldset/fieldset.scss +0 -34
- package/src/components/form-label/form-label.scss +0 -21
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Description List
|
|
4
|
+
|
|
5
|
+
A collection of terms and their details.
|
|
6
|
+
|
|
7
|
+
## Design
|
|
8
|
+
|
|
9
|
+
On a narrow screen, details appear indented below their term.
|
|
10
|
+
From the medium breakpoint, terms and details appear next to each other.
|
|
11
|
+
The column for the details is twice as wide as the one for the term.
|
|
12
|
+
|
|
13
|
+
Details are set in bold text.
|
|
14
|
+
|
|
15
|
+
## References
|
|
16
|
+
|
|
17
|
+
- [MDN: `<dl>`: The Description List element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl)
|
|
18
|
+
- [WCAG: Using description lists](https://www.w3.org/WAI/WCAG22/Techniques/html/H40)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/breakpoint";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
8
|
+
|
|
9
|
+
@mixin reset {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
margin-block: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ams-description-list {
|
|
15
|
+
color: var(--ams-description-list-color);
|
|
16
|
+
display: grid;
|
|
17
|
+
font-family: var(--ams-description-list-font-family);
|
|
18
|
+
font-size: var(--ams-description-list-font-size);
|
|
19
|
+
font-weight: var(--ams-description-list-font-weight);
|
|
20
|
+
gap: var(--ams-description-list-gap);
|
|
21
|
+
line-height: var(--ams-description-list-line-height);
|
|
22
|
+
|
|
23
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
24
|
+
grid-template-columns: 1fr 2fr;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include reset;
|
|
28
|
+
@include text-rendering;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ams-description-list--inverse-color {
|
|
32
|
+
color: var(--ams-description-list-inverse-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ams-description-list__term {
|
|
36
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
37
|
+
grid-column-start: 1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin reset-details {
|
|
42
|
+
margin-inline: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ams-description-list__details {
|
|
46
|
+
font-weight: var(--ams-description-list-details-font-weight);
|
|
47
|
+
padding-inline-start: var(--ams-description-list-details-padding-inline-start);
|
|
48
|
+
|
|
49
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
50
|
+
grid-column-start: 2;
|
|
51
|
+
padding-inline-start: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@include reset-details;
|
|
55
|
+
}
|
|
@@ -10,6 +10,13 @@ A Dialog allows the user to focus on one task or a piece of information by poppi
|
|
|
10
10
|
- Use a dialog for short and non-frequent tasks.
|
|
11
11
|
Consider using the main flow for regular tasks.
|
|
12
12
|
|
|
13
|
+
## The order of buttons
|
|
14
|
+
|
|
15
|
+
If your Dialog needs more than one button, put the one for the primary action first and the other buttons behind it.
|
|
16
|
+
Sighted users will read the primary action first, in line with the natural reading order.
|
|
17
|
+
The same goes for users of screen readers, who will hear the primary action first, and users of a keyboard, who will focus the primary action first.
|
|
18
|
+
Also, this approach keeps the order of buttons consistent on both narrow and wide screens: if the buttons do not fit next to each other, they get stacked vertically with the primary action on top.
|
|
19
|
+
|
|
13
20
|
## Keyboard Support
|
|
14
21
|
|
|
15
22
|
| key | function |
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@import "../../common/breakpoint";
|
|
7
|
-
|
|
8
6
|
.ams-dialog {
|
|
9
7
|
background-color: var(--ams-dialog-background-color);
|
|
10
8
|
border: var(--ams-dialog-border);
|
|
@@ -48,11 +46,13 @@
|
|
|
48
46
|
|
|
49
47
|
.ams-dialog__footer {
|
|
50
48
|
display: flex;
|
|
51
|
-
flex-
|
|
52
|
-
|
|
49
|
+
flex-wrap: wrap; // [1]
|
|
50
|
+
gap: var(--ams-dialog-footer-gap);
|
|
51
|
+
margin-inline-end: auto; // [1]
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
flex
|
|
56
|
-
justify-content: end;
|
|
53
|
+
> * {
|
|
54
|
+
flex: auto; // [1]
|
|
57
55
|
}
|
|
58
56
|
}
|
|
57
|
+
|
|
58
|
+
// [1] This combination stacks the buttons vertically and stretches them, until they fit next to each other.
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
// Add this class if you haven’t removed the default margin on the `<body>` element.
|
|
12
|
+
.ams-body {
|
|
13
|
+
@include reset-body;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Error Message
|
|
4
|
+
|
|
5
|
+
Show an error message when there is a form field validation error.
|
|
6
|
+
In the error message explain what went wrong and how to fix it.
|
|
7
|
+
|
|
8
|
+
For guidance and examples on using error messages in a form,
|
|
9
|
+
refer to the [Field](/docs/components-forms-field--docs) and [Field Set](/docs/components-forms-field-set--docs) documentation.
|
|
10
|
+
|
|
11
|
+
Read the documentation by [NL Design System](https://www.nldesignsystem.nl/richtlijnen/formulieren/foutmeldingen) and [Gov.uk](https://design-system.service.gov.uk/components/error-message/) for more information on the contents of error messages and when to show them.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
@mixin reset {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
margin-block: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ams-error-message {
|
|
14
|
+
color: var(--ams-error-message-color);
|
|
15
|
+
font-family: var(--ams-error-message-font-family);
|
|
16
|
+
font-size: var(--ams-error-message-font-size);
|
|
17
|
+
font-weight: var(--ams-error-message-font-weight);
|
|
18
|
+
line-height: var(--ams-error-message-line-height);
|
|
19
|
+
|
|
20
|
+
@include text-rendering;
|
|
21
|
+
@include reset;
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Field
|
|
4
|
+
|
|
5
|
+
Wraps a single input and its related elements. May indicate that the input has a validation error.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
|
|
9
|
+
Only use Field to wrap a single input. Use [Field Set](/docs/components-forms-field-set--docs) to wrap multiple inputs.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.ams-field {
|
|
7
|
+
break-inside: avoid;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--ams-field-gap);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ams-field--invalid {
|
|
14
|
+
border-inline-start: var(--ams-field-invalid-border-inline-start);
|
|
15
|
+
padding-inline-start: var(--ams-field-invalid-padding-inline-start);
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Field Set
|
|
4
|
+
|
|
5
|
+
A component to group related form inputs.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
|
|
9
|
+
- Use Field Set when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single Field Set when asking for an address.
|
|
10
|
+
|
|
11
|
+
## Relevant WCAG Requirements
|
|
12
|
+
|
|
13
|
+
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html): Field Set labels the purpose of a group of inputs.
|
|
14
|
+
|
|
15
|
+
## References
|
|
16
|
+
|
|
17
|
+
- [Providing a description for groups of form controls using fieldset and legend elements](https://www.w3.org/WAI/WCAG22/Techniques/html/H71)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
8
|
+
|
|
9
|
+
@mixin reset {
|
|
10
|
+
border: 0;
|
|
11
|
+
margin-inline: 0;
|
|
12
|
+
padding-block: 0;
|
|
13
|
+
padding-inline: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ams-field-set {
|
|
17
|
+
break-inside: avoid;
|
|
18
|
+
|
|
19
|
+
@include reset;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ams-field-set--invalid {
|
|
23
|
+
border-inline-start: var(--ams-field-set-invalid-border-inline-start);
|
|
24
|
+
padding-inline-start: var(--ams-field-set-invalid-padding-inline-start);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin reset-legend {
|
|
28
|
+
float: inline-start; // [1]
|
|
29
|
+
inline-size: 100%; // [1]
|
|
30
|
+
padding-inline: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// [1] This combination allows the fieldset border to go around the legend, instead of through it.
|
|
34
|
+
|
|
35
|
+
.ams-field-set__legend {
|
|
36
|
+
color: var(--ams-field-set-legend-color);
|
|
37
|
+
font-family: var(--ams-field-set-legend-font-family);
|
|
38
|
+
font-size: var(--ams-field-set-legend-font-size);
|
|
39
|
+
font-weight: var(--ams-field-set-legend-font-weight);
|
|
40
|
+
line-height: var(--ams-field-set-legend-line-height);
|
|
41
|
+
margin-block-end: var(
|
|
42
|
+
--ams-field-set-legend-margin-block-end
|
|
43
|
+
); /* Because of a bug in Chrome we can’t use display grid or flex for this gap */
|
|
44
|
+
|
|
45
|
+
@include hyphenation;
|
|
46
|
+
@include text-rendering;
|
|
47
|
+
@include reset-legend;
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# File Input
|
|
4
|
+
|
|
5
|
+
Allows the user to upload one or more files from their device.
|
|
6
|
+
|
|
7
|
+
## Visual considerations
|
|
8
|
+
|
|
9
|
+
The filename label and button are displayed in the language of the browser and can vary between browsers and operating systems.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
@mixin reset-button {
|
|
9
|
+
border: 0;
|
|
10
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ams-file-input {
|
|
15
|
+
background-color: var(--ams-file-input-background-color);
|
|
16
|
+
border: var(--ams-file-input-border);
|
|
17
|
+
color: var(--ams-file-input-color);
|
|
18
|
+
cursor: var(--ams-file-input-cursor);
|
|
19
|
+
font-family: var(--ams-file-input-font-family);
|
|
20
|
+
font-size: var(--ams-file-input-font-size);
|
|
21
|
+
font-weight: var(--ams-file-input-font-weight);
|
|
22
|
+
line-height: var(--ams-file-input-line-height);
|
|
23
|
+
max-inline-size: calc(100% - var(--ams-file-input-padding-inline) * 2);
|
|
24
|
+
outline-offset: 0.25rem; // Double the default focus outline offset to compensate for the dashed border
|
|
25
|
+
padding-block: var(--ams-file-input-padding-block);
|
|
26
|
+
padding-inline: var(--ams-file-input-padding-inline);
|
|
27
|
+
touch-action: manipulation;
|
|
28
|
+
|
|
29
|
+
@include text-rendering;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ams-file-input:disabled {
|
|
33
|
+
color: var(--ams-file-input-disabled-color);
|
|
34
|
+
cursor: var(--ams-file-input-disabled-cursor);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ams-file-input::file-selector-button {
|
|
38
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
39
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
40
|
+
background-color: var(--ams-file-input-file-selector-button-background-color);
|
|
41
|
+
box-shadow: var(--ams-file-input-file-selector-button-box-shadow);
|
|
42
|
+
color: var(--ams-file-input-file-selector-button-color);
|
|
43
|
+
cursor: var(--ams-file-input-file-selector-button-cursor);
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
font-size: inherit; // iOS specific fix
|
|
46
|
+
font-weight: inherit;
|
|
47
|
+
margin-inline-end: var(--ams-file-input-file-selector-button-margin-inline-end);
|
|
48
|
+
padding-block: var(--ams-file-input-file-selector-button-padding-block);
|
|
49
|
+
padding-inline: var(--ams-file-input-file-selector-button-padding-inline);
|
|
50
|
+
|
|
51
|
+
@media screen and (-ms-high-contrast: active), screen and (forced-colors: active) {
|
|
52
|
+
border: var(
|
|
53
|
+
--ams-file-input-file-selector-button-forced-color-mode-border
|
|
54
|
+
); // add border because forced colors changes box-shadow to none
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include reset-button;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ams-file-input:disabled::file-selector-button {
|
|
61
|
+
box-shadow: var(--ams-file-input-file-selector-button-disabled-box-shadow);
|
|
62
|
+
color: var(--ams-file-input-disabled-color);
|
|
63
|
+
cursor: var(--ams-file-input-file-selector-button-disabled-cursor);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ams-file-input:not(:disabled):hover::file-selector-button {
|
|
67
|
+
box-shadow: var(--ams-file-input-file-selector-button-hover-box-shadow);
|
|
68
|
+
color: var(--ams-file-input-file-selector-button-hover-color);
|
|
69
|
+
}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@
|
|
7
|
-
-webkit-text-size-adjust: 100%;
|
|
8
|
-
}
|
|
6
|
+
@import "../../common/text-rendering";
|
|
9
7
|
|
|
10
8
|
.ams-form-field-character-counter {
|
|
11
9
|
color: var(--ams-form-field-character-counter-color);
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
font-weight: var(--ams-form-field-character-counter-font-weight);
|
|
15
13
|
line-height: var(--ams-form-field-character-counter-line-height);
|
|
16
14
|
|
|
17
|
-
@include
|
|
15
|
+
@include text-rendering;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
.ams-form-field-character-counter--error {
|
|
@@ -51,27 +51,27 @@
|
|
|
51
51
|
flex: 1 1 100%;
|
|
52
52
|
|
|
53
53
|
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
54
|
-
min-
|
|
54
|
+
min-inline-size: 0;
|
|
55
55
|
order: 2;
|
|
56
56
|
|
|
57
57
|
.ams-header__title-heading {
|
|
58
58
|
display: block;
|
|
59
|
+
inline-size: 100%;
|
|
59
60
|
line-height: 1;
|
|
60
61
|
overflow: hidden;
|
|
61
62
|
text-overflow: ellipsis;
|
|
62
63
|
white-space: nowrap;
|
|
63
|
-
width: 100%;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// Temporary
|
|
68
|
+
// Temporary – will move to Mega Menu and/or Icon Button
|
|
69
69
|
.ams-header__menu-button {
|
|
70
70
|
background-color: transparent;
|
|
71
71
|
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23004699' fill-rule='evenodd' d='M0 3.238h32V7.81H0V3.238zm0 10.476h32v4.572H0v-4.572zM0 24.19h32v4.572H0V24.19z'/></svg>");
|
|
72
72
|
background-position: center right;
|
|
73
73
|
background-repeat: no-repeat;
|
|
74
|
-
background-size:
|
|
74
|
+
background-size: 1.1875rem 1.1875rem;
|
|
75
75
|
border: 0;
|
|
76
76
|
color: var(--ams-page-menu-item-color);
|
|
77
77
|
font-family: var(--ams-page-menu-item-font-family);
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
font-weight: var(--ams-page-menu-item-font-weight);
|
|
80
80
|
line-height: var(--ams-page-menu-item-line-height);
|
|
81
81
|
margin-block: 0;
|
|
82
|
-
padding-inline: 0
|
|
82
|
+
padding-inline: 0 1.875rem;
|
|
83
83
|
text-align: center;
|
|
84
84
|
touch-action: manipulation;
|
|
85
85
|
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
7
8
|
|
|
8
9
|
@mixin reset {
|
|
9
10
|
box-sizing: border-box;
|
|
10
11
|
margin-block: 0;
|
|
11
|
-
-webkit-text-size-adjust: 100%;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.ams-heading {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
font-weight: var(--ams-heading-font-weight);
|
|
20
20
|
|
|
21
21
|
@include hyphenation;
|
|
22
|
+
@include text-rendering;
|
|
22
23
|
@include reset;
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -18,37 +18,37 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.ams-icon--size-3 {
|
|
21
|
-
|
|
21
|
+
block-size: calc(var(--ams-icon-size-3-font-size) * var(--ams-icon-size-3-line-height));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.ams-icon--size-3 svg {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
block-size: var(--ams-icon-size-3-font-size);
|
|
26
|
+
inline-size: var(--ams-icon-size-3-font-size);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.ams-icon--size-4 {
|
|
30
|
-
|
|
30
|
+
block-size: calc(var(--ams-icon-size-4-font-size) * var(--ams-icon-size-4-line-height));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.ams-icon--size-4 svg {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
block-size: var(--ams-icon-size-4-font-size);
|
|
35
|
+
inline-size: var(--ams-icon-size-4-font-size);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.ams-icon--size-5 {
|
|
39
|
-
|
|
39
|
+
block-size: calc(var(--ams-icon-size-5-font-size) * var(--ams-icon-size-5-line-height));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.ams-icon--size-5 svg {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
block-size: var(--ams-icon-size-5-font-size);
|
|
44
|
+
inline-size: var(--ams-icon-size-5-font-size);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.ams-icon--size-6 {
|
|
48
|
-
|
|
48
|
+
block-size: calc(var(--ams-icon-size-6-font-size) * var(--ams-icon-size-6-line-height));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ams-icon--size-6 svg {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
block-size: var(--ams-icon-size-6-font-size);
|
|
53
|
+
inline-size: var(--ams-icon-size-6-font-size);
|
|
54
54
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
.ams-image {
|
|
7
|
+
block-size: auto; /* [1] */
|
|
7
8
|
font-style: italic; /* [3] */
|
|
8
|
-
|
|
9
|
-
max-width: 100%; /* [1] */
|
|
9
|
+
max-inline-size: 100%; /* [1] */
|
|
10
10
|
vertical-align: middle; /* [2] */
|
|
11
11
|
|
|
12
12
|
&--cover {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// [1] Allow for fluid image sizing while maintaining aspect ratio governed by
|
|
17
|
+
// [1] Allow for fluid image sizing while maintaining aspect ratio governed by inline/block size attributes
|
|
18
18
|
// [2] Remove ‘phantom’ white space
|
|
19
19
|
// [3] Italicise alt text to visually offset it from surrounding copy
|
|
20
20
|
// Source: https://x.com/csswizardry/status/1717841334462005661
|
|
@@ -4,8 +4,16 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* Append here */
|
|
7
|
+
@import "./error-message/error-message";
|
|
8
|
+
@import "./file-input/file-input";
|
|
9
|
+
@import "./field/field";
|
|
10
|
+
@import "./select/select";
|
|
11
|
+
@import "./time-input/time-input";
|
|
12
|
+
@import "./date-input/date-input";
|
|
13
|
+
@import "./document/document";
|
|
7
14
|
@import "./avatar/avatar";
|
|
8
15
|
@import "./form-field-character-counter/form-field-character-counter";
|
|
16
|
+
@import "./description-list/description-list";
|
|
9
17
|
@import "./row/row";
|
|
10
18
|
@import "./radio/radio";
|
|
11
19
|
@import "./tabs/tabs";
|
|
@@ -13,7 +21,7 @@
|
|
|
13
21
|
@import "./column/column";
|
|
14
22
|
@import "./margin/margin";
|
|
15
23
|
@import "./gap/gap";
|
|
16
|
-
@import "./
|
|
24
|
+
@import "./field-set/field-set";
|
|
17
25
|
@import "./link-list/link-list";
|
|
18
26
|
@import "./badge/badge";
|
|
19
27
|
@import "./table/table";
|
|
@@ -37,7 +45,7 @@
|
|
|
37
45
|
@import "./button/button";
|
|
38
46
|
@import "./card/card";
|
|
39
47
|
@import "./checkbox/checkbox";
|
|
40
|
-
@import "./
|
|
48
|
+
@import "./label/label";
|
|
41
49
|
@import "./grid/grid";
|
|
42
50
|
@import "./heading/heading";
|
|
43
51
|
@import "./spotlight/spotlight";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
8
|
+
|
|
9
|
+
.ams-label {
|
|
10
|
+
color: var(--ams-label-color);
|
|
11
|
+
font-family: var(--ams-label-font-family);
|
|
12
|
+
font-size: var(--ams-label-font-size);
|
|
13
|
+
font-weight: var(--ams-label-font-weight);
|
|
14
|
+
line-height: var(--ams-label-line-height);
|
|
15
|
+
|
|
16
|
+
@include hyphenation;
|
|
17
|
+
@include text-rendering;
|
|
18
|
+
}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@
|
|
7
|
-
-webkit-text-size-adjust: 100%;
|
|
8
|
-
}
|
|
6
|
+
@import "../../common/text-rendering";
|
|
9
7
|
|
|
10
8
|
.ams-link {
|
|
11
9
|
color: var(--ams-link-color);
|
|
@@ -17,7 +15,7 @@
|
|
|
17
15
|
color: var(--ams-link-hover-color);
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
@include
|
|
18
|
+
@include text-rendering;
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
.ams-link--standalone {
|
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
7
8
|
|
|
8
9
|
@mixin reset-list {
|
|
9
10
|
box-sizing: border-box;
|
|
10
11
|
list-style: none;
|
|
11
12
|
margin-block: 0;
|
|
12
13
|
padding-inline-start: 0;
|
|
13
|
-
-webkit-text-size-adjust: 100%;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.ams-link-list {
|
|
17
|
-
@include reset-list;
|
|
18
|
-
|
|
19
17
|
display: grid;
|
|
20
18
|
gap: var(--ams-link-list-gap);
|
|
19
|
+
|
|
20
|
+
@include text-rendering;
|
|
21
|
+
@include reset-list;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.ams-link-list__link {
|
|
@@ -25,10 +26,10 @@
|
|
|
25
26
|
color: var(--ams-link-list-link-color);
|
|
26
27
|
display: inline-flex;
|
|
27
28
|
font-family: var(--ams-link-list-link-font-family);
|
|
28
|
-
font-size: var(--ams-link-list-link-
|
|
29
|
+
font-size: var(--ams-link-list-link-font-size);
|
|
29
30
|
font-weight: var(--ams-link-list-link-font-weight);
|
|
30
31
|
gap: var(--ams-link-list-link-gap);
|
|
31
|
-
line-height: var(--ams-link-list-link-
|
|
32
|
+
line-height: var(--ams-link-list-link-line-height);
|
|
32
33
|
outline-offset: var(--ams-link-list-link-outline-offset);
|
|
33
34
|
text-decoration-line: var(--ams-link-list-link-text-decoration-line);
|
|
34
35
|
text-decoration-thickness: var(--ams-link-list-link-text-decoration-thickness);
|
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
8
|
/** Apply border box sizing, reset white space and list styles. */
|
|
7
9
|
@mixin reset {
|
|
8
10
|
box-sizing: border-box;
|
|
9
11
|
list-style-type: none;
|
|
10
12
|
margin-block: 0;
|
|
11
13
|
padding-inline-start: 0;
|
|
12
|
-
-webkit-text-size-adjust: 100%;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/** A list is a grid column with a gap between items. */
|
|
16
17
|
.ams-ordered-list {
|
|
17
|
-
@include reset;
|
|
18
|
-
|
|
19
18
|
display: grid;
|
|
20
19
|
gap: var(--ams-ordered-list-gap);
|
|
20
|
+
|
|
21
|
+
@include text-rendering;
|
|
22
|
+
@include reset;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
/** A list with markers sets typography for its text content. */
|
|
@@ -40,6 +42,11 @@
|
|
|
40
42
|
color: var(--ams-ordered-list-inverse-color);
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
.ams-ordered-list--small:not(.ams-ordered-list--no-markers) {
|
|
46
|
+
font-size: var(--ams-ordered-list-small-font-size);
|
|
47
|
+
line-height: var(--ams-ordered-list-small-line-height);
|
|
48
|
+
}
|
|
49
|
+
|
|
43
50
|
/** A nested list has a different marker and less indentation for correct alignment. */
|
|
44
51
|
:is(.ams-ordered-list, .ams-unordered-list) .ams-ordered-list {
|
|
45
52
|
list-style-type: var(--ams-ordered-list-ordered-list-list-style-type);
|