@amsterdam/design-system-css 0.14.1 → 0.16.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 +91 -0
- package/README.md +3 -1
- 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/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/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/page.css +1 -0
- package/dist/page/page.css.map +1 -0
- package/dist/page-footer/page-footer.css +1 -0
- package/dist/page-footer/page-footer.css.map +1 -0
- package/dist/page-header/page-header.css +1 -0
- package/dist/page-header/page-header.css.map +1 -0
- package/dist/page-heading/page-heading.css +1 -1
- package/dist/page-heading/page-heading.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/standalone-link/standalone-link.css +1 -0
- package/dist/standalone-link/standalone-link.css.map +1 -0
- 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/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/package.json +4 -4
- package/src/common/hyphenation.scss +3 -3
- package/src/components/accordion/accordion.scss +6 -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 +23 -23
- package/src/components/button/README.md +1 -1
- package/src/components/button/button.scss +4 -1
- package/src/components/card/README.md +15 -14
- package/src/components/card/card.scss +24 -19
- 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/README.md +3 -5
- package/src/components/dialog/dialog.scss +38 -5
- package/src/components/error-message/error-message.scss +2 -0
- package/src/components/field-set/field-set.scss +8 -7
- 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/gap/README.md +13 -9
- package/src/components/gap/gap.scss +8 -12
- package/src/components/grid/README.md +9 -8
- package/src/components/grid/_mixins.scss +27 -25
- package/src/components/grid/grid.scss +19 -19
- package/src/components/heading/README.md +7 -7
- package/src/components/heading/heading.scss +20 -19
- package/src/components/icon/README.md +5 -5
- package/src/components/icon/icon.scss +41 -27
- package/src/components/icon-button/icon-button.scss +16 -15
- package/src/components/image-slider/README.md +1 -1
- package/src/components/image-slider/image-slider.scss +11 -3
- package/src/components/index.scss +5 -7
- 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/label/label.scss +1 -0
- package/src/components/link/README.md +9 -11
- package/src/components/link/link.scss +13 -46
- package/src/components/link-list/link-list.scss +7 -8
- package/src/components/logo/README.md +1 -1
- 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/README.md +23 -0
- package/src/components/page/page.scss +12 -0
- package/src/components/{footer → page-footer}/README.md +7 -4
- package/src/components/page-footer/page-footer.scss +56 -0
- package/src/components/{header → page-header}/README.md +6 -5
- package/src/components/page-header/page-header.scss +237 -0
- package/src/components/page-heading/README.md +1 -1
- package/src/components/page-heading/page-heading.scss +2 -1
- 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/search-field/search-field.scss +2 -3
- package/src/components/select/select.scss +2 -2
- package/src/components/skip-link/README.md +3 -3
- package/src/components/spotlight/README.md +5 -3
- package/src/components/spotlight/spotlight.scss +6 -10
- package/src/components/standalone-link/README.md +11 -0
- package/src/components/standalone-link/standalone-link.scss +53 -0
- package/src/components/switch/switch.scss +2 -2
- package/src/components/table-of-contents/table-of-contents.scss +2 -0
- package/src/components/tabs/README.md +1 -1
- package/src/components/tabs/tabs.scss +6 -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/unordered-list/unordered-list.scss +3 -1
- package/src/components/visually-hidden/visually-hidden.scss +1 -0
- package/dist/footer/footer.css +0 -1
- package/dist/footer/footer.css.map +0 -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/dist/header/header.css +0 -1
- package/dist/header/header.css.map +0 -1
- package/dist/mega-menu/mega-menu.css +0 -1
- package/dist/mega-menu/mega-menu.css.map +0 -1
- package/dist/page-menu/page-menu.css +0 -1
- package/dist/page-menu/page-menu.css.map +0 -1
- package/dist/screen/screen.css +0 -1
- package/dist/screen/screen.css.map +0 -1
- package/dist/top-task-link/top-task-link.css +0 -1
- package/dist/top-task-link/top-task-link.css.map +0 -1
- package/src/common/size.scss +0 -14
- package/src/components/footer/footer.scss +0 -8
- package/src/components/header/header.scss +0 -216
- package/src/components/mega-menu/README.md +0 -3
- package/src/components/mega-menu/mega-menu.scss +0 -16
- package/src/components/page-menu/README.md +0 -24
- package/src/components/page-menu/page-menu.scss +0 -67
- package/src/components/screen/README.md +0 -23
- package/src/components/screen/screen.scss +0 -23
- package/src/components/top-task-link/README.md +0 -27
- package/src/components/top-task-link/top-task-link.scss +0 -45
|
@@ -4,16 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
.ams-alert {
|
|
7
|
-
align-items: flex-start;
|
|
8
7
|
background-color: var(--ams-alert-background-color);
|
|
9
|
-
|
|
10
|
-
border-width: var(--ams-alert-border-width);
|
|
8
|
+
box-shadow: var(--ams-alert-box-shadow);
|
|
11
9
|
display: flex;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
|
|
11
|
+
@media (forced-colors: active) {
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: var(--ams-alert-forced-colors-border-width);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ams-alert__severity-indicator {
|
|
18
|
+
background-color: var(--ams-alert-severity-indicator-background-color);
|
|
19
|
+
flex: none;
|
|
20
|
+
padding-block: var(--ams-alert-severity-indicator-padding-block);
|
|
21
|
+
padding-inline: var(--ams-alert-severity-indicator-padding-inline);
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
.ams-alert__content {
|
|
@@ -21,20 +26,30 @@
|
|
|
21
26
|
flex: auto;
|
|
22
27
|
flex-direction: column;
|
|
23
28
|
gap: var(--ams-alert-content-gap);
|
|
29
|
+
padding-block: var(--ams-alert-content-padding-block);
|
|
30
|
+
padding-inline: var(--ams-alert-content-padding-inline);
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
.ams-alert--error {
|
|
27
|
-
|
|
28
|
-
}
|
|
34
|
+
box-shadow: var(--ams-alert-error-box-shadow);
|
|
29
35
|
|
|
30
|
-
.ams-
|
|
31
|
-
|
|
36
|
+
> .ams-alert__severity-indicator {
|
|
37
|
+
background-color: var(--ams-alert-error-severity-indicator-background-color);
|
|
38
|
+
}
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
.ams-alert--success {
|
|
35
|
-
|
|
42
|
+
box-shadow: var(--ams-alert-success-box-shadow);
|
|
43
|
+
|
|
44
|
+
> .ams-alert__severity-indicator {
|
|
45
|
+
background-color: var(--ams-alert-success-severity-indicator-background-color);
|
|
46
|
+
}
|
|
36
47
|
}
|
|
37
48
|
|
|
38
49
|
.ams-alert--warning {
|
|
39
|
-
|
|
50
|
+
box-shadow: var(--ams-alert-warning-box-shadow);
|
|
51
|
+
|
|
52
|
+
> .ams-alert__severity-indicator {
|
|
53
|
+
background-color: var(--ams-alert-warning-severity-indicator-background-color);
|
|
54
|
+
}
|
|
40
55
|
}
|
|
@@ -9,14 +9,14 @@ Constrains media content to a supported aspect ratio.
|
|
|
9
9
|
Each available aspect ratio has an associated class name.
|
|
10
10
|
The class can be applied to any component or element.
|
|
11
11
|
|
|
12
|
-
| Class name
|
|
13
|
-
|
|
|
14
|
-
| `ams-aspect-ratio
|
|
15
|
-
| `ams-aspect-ratio
|
|
16
|
-
| `ams-aspect-ratio
|
|
17
|
-
| `ams-aspect-ratio
|
|
18
|
-
| `ams-aspect-ratio
|
|
19
|
-
| `ams-aspect-ratio
|
|
12
|
+
| Class name | Example |
|
|
13
|
+
| :---------------------- | :---------------------------------------------------------------------- |
|
|
14
|
+
| `ams-aspect-ratio-9-16` | <div className="ams-docs-token-example--space ams-aspect-ratio-9-16" /> |
|
|
15
|
+
| `ams-aspect-ratio-3-4` | <div className="ams-docs-token-example--space ams-aspect-ratio-3-4" /> |
|
|
16
|
+
| `ams-aspect-ratio-1-1` | <div className="ams-docs-token-example--space ams-aspect-ratio-1-1" /> |
|
|
17
|
+
| `ams-aspect-ratio-4-3` | <div className="ams-docs-token-example--space ams-aspect-ratio-4-3" /> |
|
|
18
|
+
| `ams-aspect-ratio-16-9` | <div className="ams-docs-token-example--space ams-aspect-ratio-16-9" /> |
|
|
19
|
+
| `ams-aspect-ratio-16-5` | <div className="ams-docs-token-example--space ams-aspect-ratio-16-5" /> |
|
|
20
20
|
|
|
21
21
|
## Guidelines
|
|
22
22
|
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
.ams-aspect-ratio {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// If you modify this list, you must also update the
|
|
8
|
+
// aspectRatioOptions in packages/react/src/common/types.ts
|
|
9
|
+
@each $value in ("9-16", "3-4", "1-1", "4-3", "16-9", "16-5") {
|
|
10
|
+
&-#{$value} {
|
|
11
|
+
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
|
12
|
+
aspect-ratio: var(--ams-aspect-ratio-#{$value}) !important;
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
@@ -6,10 +6,11 @@ A circular badge representing a person.
|
|
|
6
6
|
|
|
7
7
|
## Design
|
|
8
8
|
|
|
9
|
-
The avatar contains 1 or 2 initial letters from the person
|
|
10
|
-
The default background colour is dark blue.
|
|
9
|
+
- The avatar contains 1 or 2 initial letters from the person’s full name, a picture, or a generic icon.
|
|
11
10
|
|
|
12
11
|
## Guidelines
|
|
13
12
|
|
|
14
|
-
-
|
|
15
|
-
|
|
13
|
+
- Show an avatar for the user of the application, or to associate a person with a content item.
|
|
14
|
+
- To personalize the Avatar, the user can be allowed to choose one of the [highlight colours](/docs/brand-design-tokens-colour--docs).
|
|
15
|
+
The default is purple.
|
|
16
|
+
The design system does not define a meaning to any of these background colours.
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
.ams-avatar {
|
|
7
7
|
aspect-ratio: var(--ams-avatar-aspect-ratio);
|
|
8
|
+
background-color: var(--ams-avatar-background-color);
|
|
8
9
|
border-radius: 50%;
|
|
10
|
+
color: var(--ams-avatar-color);
|
|
9
11
|
display: inline-flex;
|
|
10
12
|
font-family: var(--ams-avatar-font-family);
|
|
11
13
|
font-size: var(--ams-avatar-font-size);
|
|
@@ -37,19 +39,9 @@
|
|
|
37
39
|
vertical-align: middle; /* Remove ‘phantom’ white space when image doesn’t load */
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
.ams-avatar--
|
|
41
|
-
background-color: var(--ams-avatar-
|
|
42
|
-
color: var(--ams-avatar-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.ams-avatar--blue {
|
|
46
|
-
background-color: var(--ams-avatar-blue-background-color);
|
|
47
|
-
color: var(--ams-avatar-blue-color);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.ams-avatar--dark-green {
|
|
51
|
-
background-color: var(--ams-avatar-dark-green-background-color);
|
|
52
|
-
color: var(--ams-avatar-dark-green-color);
|
|
42
|
+
.ams-avatar--azure {
|
|
43
|
+
background-color: var(--ams-avatar-azure-background-color);
|
|
44
|
+
color: var(--ams-avatar-azure-color);
|
|
53
45
|
}
|
|
54
46
|
|
|
55
47
|
.ams-avatar--green {
|
|
@@ -57,24 +49,9 @@
|
|
|
57
49
|
color: var(--ams-avatar-green-color);
|
|
58
50
|
}
|
|
59
51
|
|
|
60
|
-
.ams-avatar--
|
|
61
|
-
background-color: var(--ams-avatar-
|
|
62
|
-
color: var(--ams-avatar-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.ams-avatar--grey-2 {
|
|
66
|
-
background-color: var(--ams-avatar-grey-2-background-color);
|
|
67
|
-
color: var(--ams-avatar-grey-2-color);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.ams-avatar--grey-3 {
|
|
71
|
-
background-color: var(--ams-avatar-grey-3-background-color);
|
|
72
|
-
color: var(--ams-avatar-grey-3-color);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.ams-avatar--light-blue {
|
|
76
|
-
background-color: var(--ams-avatar-light-blue-background-color);
|
|
77
|
-
color: var(--ams-avatar-light-blue-color);
|
|
52
|
+
.ams-avatar--lime {
|
|
53
|
+
background-color: var(--ams-avatar-lime-background-color);
|
|
54
|
+
color: var(--ams-avatar-lime-color);
|
|
78
55
|
}
|
|
79
56
|
|
|
80
57
|
.ams-avatar--magenta {
|
|
@@ -87,21 +64,6 @@
|
|
|
87
64
|
color: var(--ams-avatar-orange-color);
|
|
88
65
|
}
|
|
89
66
|
|
|
90
|
-
.ams-avatar--purple {
|
|
91
|
-
background-color: var(--ams-avatar-purple-background-color);
|
|
92
|
-
color: var(--ams-avatar-purple-color);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.ams-avatar--red {
|
|
96
|
-
background-color: var(--ams-avatar-red-background-color);
|
|
97
|
-
color: var(--ams-avatar-red-color);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.ams-avatar--white {
|
|
101
|
-
background-color: var(--ams-avatar-white-background-color);
|
|
102
|
-
color: var(--ams-avatar-white-color);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
67
|
.ams-avatar--yellow {
|
|
106
68
|
background-color: var(--ams-avatar-yellow-background-color);
|
|
107
69
|
color: var(--ams-avatar-yellow-color);
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Badge
|
|
4
4
|
|
|
5
|
-
A
|
|
6
|
-
Guides the user in taking a specific action or describes its surrounding content.
|
|
5
|
+
A prominent label that indicates a category, property or instruction.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Guidelines
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
- Let the badge contain a short text or a number.
|
|
10
|
+
- Use any of the feedback or highlight [colours](/docs/brand-design-tokens-colour--docs) for the background.
|
|
11
|
+
The default is green.
|
|
12
|
+
Red, orange and green are especially useful for showing an error, warning, or success.
|
|
13
|
+
However, they can also be combined with the other colours without carrying these meanings.
|
|
@@ -3,53 +3,31 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use "../../common/hyphenation" as *;
|
|
7
|
+
@use "../../common/text-rendering" as *;
|
|
8
|
+
|
|
6
9
|
.ams-badge {
|
|
10
|
+
background-color: var(--ams-badge-background-color);
|
|
11
|
+
color: var(--ams-badge-color);
|
|
7
12
|
display: inline-block;
|
|
8
13
|
font-family: var(--ams-badge-font-family);
|
|
9
14
|
font-size: var(--ams-badge-font-size);
|
|
10
15
|
font-weight: var(--ams-badge-font-weight);
|
|
11
16
|
line-height: var(--ams-badge-line-height);
|
|
12
17
|
padding-inline: var(--ams-badge-padding-inline);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ams-badge--black {
|
|
16
|
-
background-color: var(--ams-badge-black-background-color);
|
|
17
|
-
color: var(--ams-badge-black-color);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ams-badge--blue {
|
|
21
|
-
background-color: var(--ams-badge-blue-background-color);
|
|
22
|
-
color: var(--ams-badge-blue-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ams-badge--dark-green {
|
|
26
|
-
background-color: var(--ams-badge-dark-green-background-color);
|
|
27
|
-
color: var(--ams-badge-dark-green-color);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.ams-badge--green {
|
|
31
|
-
background-color: var(--ams-badge-green-background-color);
|
|
32
|
-
color: var(--ams-badge-green-color);
|
|
33
|
-
}
|
|
34
18
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
color: var(--ams-badge-grey-1-color);
|
|
19
|
+
@include hyphenation;
|
|
20
|
+
@include text-rendering;
|
|
38
21
|
}
|
|
39
22
|
|
|
40
|
-
.ams-badge--
|
|
41
|
-
background-color: var(--ams-badge-
|
|
42
|
-
color: var(--ams-badge-
|
|
23
|
+
.ams-badge--azure {
|
|
24
|
+
background-color: var(--ams-badge-azure-background-color);
|
|
25
|
+
color: var(--ams-badge-azure-color);
|
|
43
26
|
}
|
|
44
27
|
|
|
45
|
-
.ams-badge--
|
|
46
|
-
background-color: var(--ams-badge-
|
|
47
|
-
color: var(--ams-badge-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.ams-badge--light-blue {
|
|
51
|
-
background-color: var(--ams-badge-light-blue-background-color);
|
|
52
|
-
color: var(--ams-badge-light-blue-color);
|
|
28
|
+
.ams-badge--lime {
|
|
29
|
+
background-color: var(--ams-badge-lime-background-color);
|
|
30
|
+
color: var(--ams-badge-lime-color);
|
|
53
31
|
}
|
|
54
32
|
|
|
55
33
|
.ams-badge--magenta {
|
|
@@ -72,11 +50,6 @@
|
|
|
72
50
|
color: var(--ams-badge-red-color);
|
|
73
51
|
}
|
|
74
52
|
|
|
75
|
-
.ams-badge--white {
|
|
76
|
-
background-color: var(--ams-badge-white-background-color);
|
|
77
|
-
color: var(--ams-badge-white-color);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
53
|
.ams-badge--yellow {
|
|
81
54
|
background-color: var(--ams-badge-yellow-background-color);
|
|
82
55
|
color: var(--ams-badge-yellow-color);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use "../../common/hyphenation" as *;
|
|
6
7
|
@use "../../common/text-rendering" as *;
|
|
7
8
|
|
|
8
9
|
@mixin reset-ol {
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
break-after: avoid;
|
|
23
24
|
break-inside: avoid;
|
|
24
25
|
|
|
26
|
+
@include hyphenation;
|
|
25
27
|
@include text-rendering;
|
|
26
28
|
@include reset-ol;
|
|
27
29
|
}
|
|
@@ -19,52 +19,52 @@ $ams-breakout-row-span-max: 4;
|
|
|
19
19
|
@include ams-grid--gap-vertical--none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.ams-breakout--gap-vertical--small {
|
|
23
|
-
@include ams-grid--gap-vertical--small;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
22
|
.ams-breakout--gap-vertical--large {
|
|
27
23
|
@include ams-grid--gap-vertical--large;
|
|
28
24
|
}
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.ams-breakout--padding-bottom--small {
|
|
33
|
-
@include ams-grid--padding-bottom--small;
|
|
26
|
+
.ams-breakout--gap-vertical--2x-large {
|
|
27
|
+
@include ams-grid--gap-vertical--2x-large;
|
|
34
28
|
}
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
@include ams-grid--padding-bottom--medium;
|
|
38
|
-
}
|
|
30
|
+
// Grid padding
|
|
39
31
|
|
|
40
32
|
.ams-breakout--padding-bottom--large {
|
|
41
33
|
@include ams-grid--padding-bottom--large;
|
|
42
34
|
}
|
|
43
35
|
|
|
44
|
-
.ams-breakout--padding-
|
|
45
|
-
@include ams-grid--padding-
|
|
36
|
+
.ams-breakout--padding-bottom--x-large {
|
|
37
|
+
@include ams-grid--padding-bottom--x-large;
|
|
46
38
|
}
|
|
47
39
|
|
|
48
|
-
.ams-breakout--padding-
|
|
49
|
-
@include ams-grid--padding-
|
|
40
|
+
.ams-breakout--padding-bottom--2x-large {
|
|
41
|
+
@include ams-grid--padding-bottom--2x-large;
|
|
50
42
|
}
|
|
51
43
|
|
|
52
44
|
.ams-breakout--padding-top--large {
|
|
53
45
|
@include ams-grid--padding-top--large;
|
|
54
46
|
}
|
|
55
47
|
|
|
56
|
-
.ams-breakout--padding-
|
|
57
|
-
@include ams-grid--padding-
|
|
48
|
+
.ams-breakout--padding-top--x-large {
|
|
49
|
+
@include ams-grid--padding-top--x-large;
|
|
58
50
|
}
|
|
59
51
|
|
|
60
|
-
.ams-breakout--padding-
|
|
61
|
-
@include ams-grid--padding-
|
|
52
|
+
.ams-breakout--padding-top--2x-large {
|
|
53
|
+
@include ams-grid--padding-top--2x-large;
|
|
62
54
|
}
|
|
63
55
|
|
|
64
56
|
.ams-breakout--padding-vertical--large {
|
|
65
57
|
@include ams-grid--padding-vertical--large;
|
|
66
58
|
}
|
|
67
59
|
|
|
60
|
+
.ams-breakout--padding-vertical--x-large {
|
|
61
|
+
@include ams-grid--padding-vertical--x-large;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ams-breakout--padding-vertical--2x-large {
|
|
65
|
+
@include ams-grid--padding-vertical--2x-large;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
68
|
// Column span
|
|
69
69
|
// The order of these declaration blocks ensures the intended specificity.
|
|
70
70
|
|
|
@@ -114,15 +114,15 @@ $ams-breakout-row-span-max: 4;
|
|
|
114
114
|
|
|
115
115
|
.ams-breakout__cell--has-spotlight {
|
|
116
116
|
display: grid; /* Stretches the empty Spotlight vertically. */
|
|
117
|
-
margin-block: calc(var(--ams-space-
|
|
118
|
-
margin-inline: calc(var(--ams-space-
|
|
117
|
+
margin-block: calc(var(--ams-space-xl) * -1);
|
|
118
|
+
margin-inline: calc(var(--ams-space-2xl) * -1);
|
|
119
119
|
|
|
120
120
|
.ams-breakout--gap-vertical--small > & {
|
|
121
|
-
margin-block: calc(var(--ams-space-
|
|
121
|
+
margin-block: calc(var(--ams-space-l) * -1);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.ams-breakout--gap-vertical--large > & {
|
|
125
|
-
margin-block: calc(var(--ams-space-
|
|
125
|
+
margin-block: calc(var(--ams-space-2xl) * -1);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -9,7 +9,7 @@ Allows the user to perform actions and operate the user interface.
|
|
|
9
9
|
- Choose a short label that describes the function of the button.
|
|
10
10
|
- Use the correct type of button for the corresponding application, e.g. `type="submit"` for the primary form button.
|
|
11
11
|
- Make sure one can operate a button through a keyboard.
|
|
12
|
-
- Wrap 2 or more consecutive buttons and/or links in an [Action Group](
|
|
12
|
+
- Wrap 2 or more consecutive buttons and/or links in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-layout-action-group--docs).
|
|
13
13
|
- Primary, secondary and tertiary buttons can be used side by side.
|
|
14
14
|
Skipping levels is allowed.
|
|
15
15
|
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use "../../common/hyphenation" as *;
|
|
6
7
|
@use "../../common/text-rendering" as *;
|
|
7
8
|
|
|
8
9
|
@mixin reset-button {
|
|
9
|
-
border:
|
|
10
|
+
border: none;
|
|
10
11
|
margin-block: 0; // [1]
|
|
11
12
|
margin-inline: 0; // [1]
|
|
12
13
|
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
display: inline-flex;
|
|
19
20
|
font-family: var(--ams-button-font-family);
|
|
20
21
|
font-size: var(--ams-button-font-size);
|
|
22
|
+
font-weight: var(--ams-button-font-weight);
|
|
21
23
|
gap: var(--ams-button-gap);
|
|
22
24
|
justify-content: center;
|
|
23
25
|
line-height: var(--ams-button-line-height);
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
padding-inline: var(--ams-button-padding-inline);
|
|
27
29
|
touch-action: manipulation;
|
|
28
30
|
|
|
31
|
+
@include hyphenation;
|
|
29
32
|
@include text-rendering;
|
|
30
33
|
@include reset-button;
|
|
31
34
|
|
|
@@ -2,27 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
# Card
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
The card typically includes the title, introduction, and an image of the content.
|
|
7
|
-
The link is mandatory.
|
|
5
|
+
A brief section of a heading, some text, and optionally an image, that leads to a related page.
|
|
8
6
|
|
|
9
7
|
## Guidelines
|
|
10
8
|
|
|
11
|
-
- The title of a card is a link within a
|
|
12
|
-
The
|
|
13
|
-
The link is active across the entire area of the card.
|
|
9
|
+
- The mandatory title of a card is a link within a Heading.
|
|
10
|
+
The guidelines for regular [links](/docs/components-navigation-link--docs) and [headings](/docs/components-text-heading--docs) apply.
|
|
11
|
+
The link is made active across the entire area of the card.
|
|
14
12
|
- A card needs more content than just a title.
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
Add a short text and optionally an image and metadata.
|
|
14
|
+
- Use the Card Heading, Card Heading Group and Card Image subcomponents.
|
|
15
|
+
They apply the correct spacing.
|
|
16
|
+
- Card Heading requires a `level`, because there is no sensible default.
|
|
17
|
+
Its visual size of `heading-4` can be overridden.
|
|
18
|
+
- Place the text in a regular [Paragraph](/docs/components-text-paragraph--docs).
|
|
19
|
+
Use a small Paragraph for a publication date.
|
|
20
|
+
- This component is not the best option if the target content does not represent an article-like page.
|
|
21
|
+
In that case, use a Heading, a Paragraph and a [Standalone Link](/docs/components-navigation-standalone-link--docs) instead.
|
|
21
22
|
|
|
22
23
|
### Screen readers
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
Screen reader users may navigate a page using headings and links.
|
|
26
|
+
A Card works well in both approaches as its title carries a link.
|
|
26
27
|
A screen reader reads the title first, followed by the rest of the content.
|
|
27
28
|
|
|
28
29
|
### Using links with routing libraries
|
|
@@ -5,36 +5,23 @@
|
|
|
5
5
|
|
|
6
6
|
.ams-card {
|
|
7
7
|
display: grid;
|
|
8
|
-
gap: var(--ams-card-gap);
|
|
9
8
|
outline-offset: var(--ams-card-outline-offset);
|
|
10
|
-
position: relative;
|
|
9
|
+
position: relative; // Allows stretching the card link below.
|
|
11
10
|
touch-action: manipulation;
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
// Set native outline to Card if it has a visible focus inside.
|
|
14
13
|
&:has(:focus-visible) {
|
|
15
14
|
outline-color: -webkit-focus-ring-color;
|
|
16
15
|
outline-style: auto;
|
|
17
16
|
outline-width: 0.0625rem;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
which means the outline on the whole card is set
|
|
23
|
-
*/
|
|
24
|
-
&:has(:focus-visible) a:focus {
|
|
25
|
-
outline: none;
|
|
19
|
+
> .ams-card__heading:has(+ *) {
|
|
20
|
+
margin-block-end: var(--ams-card-heading-margin-block-end);
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Taken from https://inclusive-components.design/cards/
|
|
31
|
-
*/
|
|
32
|
-
a::after {
|
|
33
|
-
content: "";
|
|
34
|
-
display: block;
|
|
35
|
-
inset-block: 0;
|
|
36
|
-
inset-inline: 0;
|
|
37
|
-
position: absolute;
|
|
23
|
+
> .ams-card__image:has(+ *) {
|
|
24
|
+
margin-block-end: var(--ams-card-image-margin-block-end);
|
|
38
25
|
}
|
|
39
26
|
}
|
|
40
27
|
|
|
@@ -42,6 +29,7 @@
|
|
|
42
29
|
display: flex;
|
|
43
30
|
flex-direction: column-reverse;
|
|
44
31
|
gap: var(--ams-card-heading-group-gap);
|
|
32
|
+
margin-block-end: var(--ams-card-heading-group-margin-block-end);
|
|
45
33
|
}
|
|
46
34
|
|
|
47
35
|
.ams-card__link {
|
|
@@ -50,8 +38,25 @@
|
|
|
50
38
|
text-decoration-thickness: var(--ams-card-link-text-decoration-thickness);
|
|
51
39
|
text-underline-offset: var(--ams-card-link-text-underline-offset);
|
|
52
40
|
|
|
41
|
+
// Make the whole Card clickable by making the link cover its entire area.
|
|
42
|
+
// Source: https://inclusive-components.design/cards/
|
|
43
|
+
&::after {
|
|
44
|
+
content: "";
|
|
45
|
+
display: block;
|
|
46
|
+
inset-block: 0;
|
|
47
|
+
inset-inline: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
}
|
|
50
|
+
|
|
53
51
|
&:hover {
|
|
54
52
|
color: var(--ams-card-link-hover-color);
|
|
55
53
|
text-decoration-line: var(--ams-card-link-hover-text-decoration-line);
|
|
56
54
|
}
|
|
55
|
+
|
|
56
|
+
// Remove the outline from the link; it’s already on the Card.
|
|
57
|
+
// Reuses the `.ams-card:has(:focus-visible)` selector above, so that
|
|
58
|
+
// browsers that support it apply both styles, while those that don’t apply neither.
|
|
59
|
+
.ams-card:has(:focus-visible) &:focus {
|
|
60
|
+
outline: none;
|
|
61
|
+
}
|
|
57
62
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use "../../common/hyphenation" as *;
|
|
6
7
|
@use "../../common/text-rendering" as *;
|
|
7
8
|
|
|
8
9
|
.ams-character-count {
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
font-weight: var(--ams-character-count-font-weight);
|
|
13
14
|
line-height: var(--ams-character-count-line-height);
|
|
14
15
|
|
|
16
|
+
@include hyphenation;
|
|
15
17
|
@include text-rendering;
|
|
16
18
|
}
|
|
17
19
|
|