@amsterdam/design-system-css 0.3.0 → 0.5.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 +38 -0
- package/LICENSE.md +1 -1
- package/LICENSE.txt +287 -0
- package/README.md +13 -1
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/alert/alert.css +1 -1
- package/dist/alert/alert.css.map +1 -1
- package/dist/badge/badge.css +1 -0
- package/dist/badge/badge.css.map +1 -0
- 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/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/form-label/form-label.css +1 -1
- package/dist/form-label/form-label.css.map +1 -1
- package/dist/grid/grid.css +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/header/header.css +1 -1
- package/dist/header/header.css.map +1 -1
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.css.map +1 -1
- package/dist/icon/icon.css +1 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/icon-button/icon-button.css +1 -0
- package/dist/icon-button/icon-button.css.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.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 -0
- package/dist/link-list/link-list.css.map +1 -0
- package/dist/mega-menu/mega-menu.css +1 -0
- package/dist/mega-menu/mega-menu.css.map +1 -0
- 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/search-field/search-field.css +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/skip-link/skip-link.css +1 -1
- package/dist/skip-link/skip-link.css.map +1 -1
- package/dist/spotlight/spotlight.css +1 -1
- package/dist/spotlight/spotlight.css.map +1 -1
- package/dist/table/table.css +1 -0
- package/dist/table/table.css.map +1 -0
- package/dist/text-input/text-input.css +1 -1
- package/dist/text-input/text-input.css.map +1 -1
- package/dist/top-task-link/top-task-link.css +1 -1
- package/dist/top-task-link/top-task-link.css.map +1 -1
- package/dist/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/documentation/coding-conventions.md +4 -2
- package/package.json +9 -10
- package/src/common/hyphenation.scss +5 -0
- package/src/components/accordion/README.md +45 -38
- package/src/components/accordion/accordion.scss +2 -7
- package/src/components/alert/README.md +15 -11
- package/src/components/alert/alert.scss +8 -38
- package/src/components/aspect-ratio/README.md +12 -12
- package/src/components/badge/README.md +10 -0
- package/src/components/badge/badge.scss +53 -0
- package/src/components/blockquote/README.md +8 -8
- package/src/components/blockquote/blockquote.scss +5 -7
- package/src/components/breadcrumb/README.md +10 -7
- package/src/components/breadcrumb/breadcrumb.scss +2 -7
- package/src/components/button/README.md +17 -14
- package/src/components/button/button.scss +2 -7
- package/src/components/card/README.md +18 -19
- package/src/components/checkbox/README.md +19 -18
- package/src/components/checkbox/checkbox.scss +3 -12
- package/src/components/dialog/README.md +9 -8
- package/src/components/dialog/dialog.scss +4 -23
- package/src/components/footer/README.md +11 -7
- package/src/components/form-label/README.md +5 -1
- package/src/components/form-label/form-label.scss +5 -7
- package/src/components/grid/README.md +12 -13
- package/src/components/grid/grid.scss +2 -6
- package/src/components/header/README.md +2 -2
- package/src/components/header/header.scss +2 -2
- package/src/components/heading/README.md +14 -11
- package/src/components/heading/heading.scss +15 -42
- package/src/components/icon/README.md +19 -9
- package/src/components/icon/icon.scss +17 -50
- package/src/components/icon-button/README.md +14 -0
- package/src/components/icon-button/icon-button.scss +60 -0
- package/src/components/image/README.md +16 -17
- package/src/components/index.scss +5 -0
- package/src/components/link/README.md +26 -24
- package/src/components/link/link.scss +2 -35
- package/src/components/link-list/README.md +16 -0
- package/src/components/link-list/link-list.scss +69 -0
- package/src/components/logo/README.md +21 -20
- package/src/components/mark/README.md +10 -11
- package/src/components/mega-menu/README.md +1 -0
- package/src/components/mega-menu/mega-menu.scss +14 -0
- package/src/components/ordered-list/README.md +5 -5
- package/src/components/ordered-list/ordered-list.scss +2 -7
- package/src/components/overlap/README.md +1 -1
- package/src/components/page-heading/README.md +10 -9
- package/src/components/page-heading/page-heading.scss +5 -7
- package/src/components/page-menu/README.md +10 -9
- package/src/components/page-menu/page-menu.scss +2 -7
- package/src/components/pagination/README.md +13 -10
- package/src/components/pagination/pagination.scss +2 -7
- package/src/components/paragraph/README.md +16 -14
- package/src/components/paragraph/paragraph.scss +6 -21
- package/src/components/screen/README.md +12 -12
- package/src/components/search-field/README.md +18 -18
- package/src/components/search-field/search-field.scss +4 -17
- package/src/components/skip-link/README.md +18 -25
- package/src/components/skip-link/skip-link.scss +0 -5
- package/src/components/spotlight/README.md +5 -5
- package/src/components/spotlight/spotlight.scss +4 -4
- package/src/components/switch/README.md +11 -9
- package/src/components/table/README.md +11 -0
- package/src/components/table/table.scss +36 -0
- package/src/components/text-input/README.md +10 -8
- package/src/components/text-input/text-input.scss +2 -7
- package/src/components/top-task-link/README.md +15 -14
- package/src/components/top-task-link/top-task-link.scss +6 -13
- package/src/components/unordered-list/README.md +5 -5
- package/src/components/unordered-list/unordered-list.scss +2 -7
- package/src/components/visually-hidden/README.md +3 -2
- package/src/components/button/button-css.md +0 -12
- package/src/components/checkbox/checkbox-css.md +0 -3
- package/src/components/footer/footer-css.md +0 -11
- package/src/components/heading/heading-css.md +0 -3
- package/src/components/paragraph/paragraph-css.md +0 -3
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
border: 0;
|
|
76
76
|
color: var(--amsterdam-page-menu-item-color);
|
|
77
77
|
font-family: var(--amsterdam-page-menu-item-font-family);
|
|
78
|
-
font-size: var(--amsterdam-page-menu-item-
|
|
78
|
+
font-size: var(--amsterdam-page-menu-item-font-size);
|
|
79
79
|
font-weight: var(--amsterdam-page-menu-item-font-weight);
|
|
80
|
-
line-height: var(--amsterdam-page-menu-item-
|
|
80
|
+
line-height: var(--amsterdam-page-menu-item-line-height);
|
|
81
81
|
margin-block: 0;
|
|
82
82
|
padding-inline: 0 30px;
|
|
83
83
|
text-align: center;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
# Heading
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A heading conveys information about the content below it.
|
|
4
|
+
Use headings to allow the user to grasp the structure of the page quickly.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- A heading describes the content beneath it.
|
|
9
|
+
- Do not use a heading for formatting and styling. Use it to represent the page’s structure.
|
|
10
|
+
- Use headings hierarchically, and do not skip heading levels.
|
|
11
|
+
So, an `h1` heading should be followed by an `h2`, not an `h3`.
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Relevant WCAG Requirements
|
|
12
14
|
|
|
13
15
|
- [WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-content-structure-separation-programmatic):
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- [WCAG 2.4.
|
|
17
|
-
- [WCAG 2.4.
|
|
16
|
+
Text that looks like a heading is also recognized as a heading by a computer.
|
|
17
|
+
Using the correct heading level makes the page structure clear for all users.
|
|
18
|
+
- [WCAG 2.4.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-navigation-mechanisms-skip): Headings can be used to navigate to the next section with the keyboard.
|
|
19
|
+
- [WCAG 2.4.6](https://www.w3.org/WAI/WCAG21/quickref/#headings-and-labels): Use headings to describe the purpose or subject of the underlying content.
|
|
20
|
+
- [WCAG 2.4.10](https://www.w3.org/WAI/WCAG21/quickref/#qr-navigation-mechanisms-headings): Use headings to structure the content.
|
|
18
21
|
|
|
19
|
-
##
|
|
22
|
+
## References
|
|
20
23
|
|
|
21
24
|
- [W3C - Headings](https://www.w3.org/WAI/tutorials/page-structure/headings/)
|
|
22
25
|
- [W3C - Headings & labels](https://www.w3.org/TR/WCAG21/#headings-and-labels)
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
|
|
6
8
|
@mixin reset {
|
|
7
9
|
box-sizing: border-box;
|
|
8
10
|
margin-block: 0;
|
|
@@ -16,67 +18,38 @@
|
|
|
16
18
|
font-family: var(--amsterdam-heading-font-family);
|
|
17
19
|
font-weight: var(--amsterdam-heading-font-weight);
|
|
18
20
|
|
|
21
|
+
@include hyphenation;
|
|
19
22
|
@include reset;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
.amsterdam-heading--1 {
|
|
23
|
-
font-size: var(--amsterdam-heading-
|
|
24
|
-
line-height: var(--amsterdam-heading-
|
|
25
|
-
|
|
26
|
-
.amsterdam-theme--compact & {
|
|
27
|
-
font-size: var(--amsterdam-heading-compact-level-1-font-size);
|
|
28
|
-
line-height: var(--amsterdam-heading-compact-level-1-line-height);
|
|
29
|
-
}
|
|
26
|
+
font-size: var(--amsterdam-heading-level-1-font-size);
|
|
27
|
+
line-height: var(--amsterdam-heading-level-1-line-height);
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
.amsterdam-heading--2 {
|
|
33
|
-
font-size: var(--amsterdam-heading-
|
|
34
|
-
line-height: var(--amsterdam-heading-
|
|
35
|
-
|
|
36
|
-
.amsterdam-theme--compact & {
|
|
37
|
-
font-size: var(--amsterdam-heading-compact-level-2-font-size);
|
|
38
|
-
line-height: var(--amsterdam-heading-compact-level-2-line-height);
|
|
39
|
-
}
|
|
31
|
+
font-size: var(--amsterdam-heading-level-2-font-size);
|
|
32
|
+
line-height: var(--amsterdam-heading-level-2-line-height);
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
.amsterdam-heading--3 {
|
|
43
|
-
font-size: var(--amsterdam-heading-
|
|
44
|
-
line-height: var(--amsterdam-heading-
|
|
45
|
-
|
|
46
|
-
.amsterdam-theme--compact & {
|
|
47
|
-
font-size: var(--amsterdam-heading-compact-level-3-font-size);
|
|
48
|
-
line-height: var(--amsterdam-heading-compact-level-3-line-height);
|
|
49
|
-
}
|
|
36
|
+
font-size: var(--amsterdam-heading-level-3-font-size);
|
|
37
|
+
line-height: var(--amsterdam-heading-level-3-line-height);
|
|
50
38
|
}
|
|
51
39
|
|
|
52
40
|
.amsterdam-heading--4 {
|
|
53
|
-
font-size: var(--amsterdam-heading-
|
|
54
|
-
line-height: var(--amsterdam-heading-
|
|
55
|
-
|
|
56
|
-
.amsterdam-theme--compact & {
|
|
57
|
-
font-size: var(--amsterdam-heading-compact-level-4-font-size);
|
|
58
|
-
line-height: var(--amsterdam-heading-compact-level-4-line-height);
|
|
59
|
-
}
|
|
41
|
+
font-size: var(--amsterdam-heading-level-4-font-size);
|
|
42
|
+
line-height: var(--amsterdam-heading-level-4-line-height);
|
|
60
43
|
}
|
|
61
44
|
|
|
62
45
|
.amsterdam-heading--5 {
|
|
63
|
-
font-size: var(--amsterdam-heading-
|
|
64
|
-
line-height: var(--amsterdam-heading-
|
|
65
|
-
|
|
66
|
-
.amsterdam-theme--compact & {
|
|
67
|
-
font-size: var(--amsterdam-heading-compact-level-5-font-size);
|
|
68
|
-
line-height: var(--amsterdam-heading-compact-level-5-line-height);
|
|
69
|
-
}
|
|
46
|
+
font-size: var(--amsterdam-heading-level-5-font-size);
|
|
47
|
+
line-height: var(--amsterdam-heading-level-5-line-height);
|
|
70
48
|
}
|
|
71
49
|
|
|
72
50
|
.amsterdam-heading--6 {
|
|
73
|
-
font-size: var(--amsterdam-heading-
|
|
74
|
-
line-height: var(--amsterdam-heading-
|
|
75
|
-
|
|
76
|
-
.amsterdam-theme--compact & {
|
|
77
|
-
font-size: var(--amsterdam-heading-compact-level-6-font-size);
|
|
78
|
-
line-height: var(--amsterdam-heading-compact-level-6-line-height);
|
|
79
|
-
}
|
|
51
|
+
font-size: var(--amsterdam-heading-level-6-font-size);
|
|
52
|
+
line-height: var(--amsterdam-heading-level-6-line-height);
|
|
80
53
|
}
|
|
81
54
|
|
|
82
55
|
.amsterdam-heading--inverse-color {
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
# Icon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Icons are visual symbols used to represent ideas, themes, or actions.
|
|
4
|
+
They communicate the message at a glance and draw attention to important (interactive) information.
|
|
5
|
+
Always use an `Icon` component to encapsulate an SVG icon for proper styling and sizing.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Interactive Elements
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Use an icon to support textual interactive elements like buttons and links.
|
|
10
|
+
Always try to provide accompanying text for an icon.
|
|
11
|
+
Only use icons without accompanying text if they adhere to international standards, such as menu (hamburger icon), search (magnifying glass), next, previous, play, pause, etc.
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## Color
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Icons are black or white.
|
|
16
|
+
When used as part of an interactive element, they are dark blue.
|
|
17
|
+
When disabled, they are grey.
|
|
18
|
+
They must adhere to the same contrast ratio for accessibility as typography against a background colour.
|
|
19
|
+
The icon defaults to the colour of the container it is in.
|
|
12
20
|
|
|
13
|
-
##
|
|
21
|
+
## Alignment
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
Icons are aligned to the left of the text by default and vertically centred to the middle of the first line of text.
|
|
16
24
|
|
|
17
|
-
##
|
|
25
|
+
## Size
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
Icons use the same text levels as all typographic components to determine their size.
|
|
28
|
+
This ensures easy alignment between icons and text.
|
|
29
|
+
[Refer to the typography documentation for more information](/docs/docs-designrichtlijnen-typografie--docs#tekstniveaus).
|
|
@@ -12,76 +12,43 @@
|
|
|
12
12
|
fill: currentColor;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.amsterdam-icon--square {
|
|
16
|
+
aspect-ratio: 1 / 1;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.amsterdam-icon--size-3 {
|
|
16
|
-
height: calc(var(--amsterdam-icon-
|
|
21
|
+
height: calc(var(--amsterdam-icon-size-3-font-size) * var(--amsterdam-icon-size-3-line-height));
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
.amsterdam-icon--size-3 svg {
|
|
20
|
-
height: var(--amsterdam-icon-
|
|
21
|
-
width: var(--amsterdam-icon-
|
|
25
|
+
height: var(--amsterdam-icon-size-3-font-size);
|
|
26
|
+
width: var(--amsterdam-icon-size-3-font-size);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
.amsterdam-icon--size-4 {
|
|
25
|
-
height: calc(var(--amsterdam-icon-
|
|
30
|
+
height: calc(var(--amsterdam-icon-size-4-font-size) * var(--amsterdam-icon-size-4-line-height));
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
.amsterdam-icon--size-4 svg {
|
|
29
|
-
height: var(--amsterdam-icon-
|
|
30
|
-
width: var(--amsterdam-icon-
|
|
34
|
+
height: var(--amsterdam-icon-size-4-font-size);
|
|
35
|
+
width: var(--amsterdam-icon-size-4-font-size);
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
.amsterdam-icon--size-5 {
|
|
34
|
-
height: calc(var(--amsterdam-icon-
|
|
39
|
+
height: calc(var(--amsterdam-icon-size-5-font-size) * var(--amsterdam-icon-size-5-line-height));
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
.amsterdam-icon--size-5 svg {
|
|
38
|
-
height: var(--amsterdam-icon-
|
|
39
|
-
width: var(--amsterdam-icon-
|
|
43
|
+
height: var(--amsterdam-icon-size-5-font-size);
|
|
44
|
+
width: var(--amsterdam-icon-size-5-font-size);
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
.amsterdam-icon--size-6 {
|
|
43
|
-
height: calc(var(--amsterdam-icon-
|
|
48
|
+
height: calc(var(--amsterdam-icon-size-6-font-size) * var(--amsterdam-icon-size-6-line-height));
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
.amsterdam-icon--size-6 svg {
|
|
47
|
-
height: var(--amsterdam-icon-
|
|
48
|
-
width: var(--amsterdam-icon-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.amsterdam-theme--compact {
|
|
52
|
-
.amsterdam-icon--size-3 {
|
|
53
|
-
height: calc(var(--amsterdam-icon-compact-size-3-font-size) * var(--amsterdam-icon-compact-size-3-line-height));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.amsterdam-icon--size-3 svg {
|
|
57
|
-
height: var(--amsterdam-icon-compact-size-3-font-size);
|
|
58
|
-
width: var(--amsterdam-icon-compact-size-3-font-size);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.amsterdam-icon--size-4 {
|
|
62
|
-
height: calc(var(--amsterdam-icon-compact-size-4-font-size) * var(--amsterdam-icon-compact-size-4-line-height));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.amsterdam-icon--size-4 svg {
|
|
66
|
-
height: var(--amsterdam-icon-compact-size-4-font-size);
|
|
67
|
-
width: var(--amsterdam-icon-compact-size-4-font-size);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.amsterdam-icon--size-5 {
|
|
71
|
-
height: calc(var(--amsterdam-icon-compact-size-5-font-size) * var(--amsterdam-icon-compact-size-5-line-height));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.amsterdam-icon--size-5 svg {
|
|
75
|
-
height: var(--amsterdam-icon-compact-size-5-font-size);
|
|
76
|
-
width: var(--amsterdam-icon-compact-size-5-font-size);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.amsterdam-icon--size-6 {
|
|
80
|
-
height: calc(var(--amsterdam-icon-compact-size-6-font-size) * var(--amsterdam-icon-compact-size-6-line-height));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.amsterdam-icon--size-6 svg {
|
|
84
|
-
height: var(--amsterdam-icon-compact-size-6-font-size);
|
|
85
|
-
width: var(--amsterdam-icon-compact-size-6-font-size);
|
|
86
|
-
}
|
|
52
|
+
height: var(--amsterdam-icon-size-6-font-size);
|
|
53
|
+
width: var(--amsterdam-icon-size-6-font-size);
|
|
87
54
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Icon Button
|
|
2
|
+
|
|
3
|
+
A button containing only an icon.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
- Use this button only if the icon is entirely clear and understandable.
|
|
8
|
+
Many icons are interpreted differently by different users.
|
|
9
|
+
Only use universally recognized icons, such as a close icon or a play icon.
|
|
10
|
+
- Provide a label text that describes what the button does for screen reader users.
|
|
11
|
+
|
|
12
|
+
## Relevant WCAG Requirements
|
|
13
|
+
|
|
14
|
+
The Icon Button follows [the same requirements and guidelines as a regular button](https://amsterdam.github.io/design-system/?path=/docs/react_buttons-button--docs).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin reset {
|
|
7
|
+
border: 0;
|
|
8
|
+
padding-block: 0;
|
|
9
|
+
padding-inline: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.amsterdam-icon-button {
|
|
13
|
+
background-color: transparent;
|
|
14
|
+
color: var(--amsterdam-icon-button-color);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
outline-offset: var(--amsterdam-icon-button-outline-offset);
|
|
17
|
+
touch-action: manipulation;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background-color: var(--amsterdam-icon-button-hover-background-color);
|
|
21
|
+
color: var(--amsterdam-icon-button-hover-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:disabled {
|
|
25
|
+
background-color: transparent;
|
|
26
|
+
color: var(--amsterdam-icon-button-disabled-color);
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include reset;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.amsterdam-icon-button--on-background-light {
|
|
34
|
+
color: var(--amsterdam-icon-button-on-background-light-color);
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background-color: var(--amsterdam-icon-button-on-background-light-hover-background-color);
|
|
38
|
+
color: var(--amsterdam-icon-button-on-background-light-hover-color);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:disabled {
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
color: var(--amsterdam-icon-button-on-background-light-disabled-color);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.amsterdam-icon-button--on-background-dark {
|
|
48
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-background-color);
|
|
49
|
+
color: var(--amsterdam-icon-button-on-background-dark-color);
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-hover-background-color);
|
|
53
|
+
color: var(--amsterdam-icon-button-on-background-dark-hover-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:disabled {
|
|
57
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-disabled-background-color);
|
|
58
|
+
color: var(--amsterdam-icon-button-on-background-dark-disabled-color);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
# Image
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Displays an image.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- Zorg ervoor dat de afbeelding een beeldverhouding heeft die ondersteund wordt door het [Aspect Ratio](?path=/docs/layout-aspect-ratio--docs) component.
|
|
7
|
+
- Do not forget to include a description of the image in the `alt` attribute.
|
|
8
|
+
This ensures that screen reader users can also access this information.
|
|
9
|
+
Additionally, it can aid in search engine optimization.
|
|
10
|
+
- A description is unnecessary for decorative images; use `alt=""` for these.
|
|
11
|
+
Examples are images that add little to the nearby text or pictures that purely contribute to the design or atmosphere of the page (source: [W3C Web Accessibility Initiative](https://www.w3.org/WAI/tutorials/images/decorative/)).
|
|
12
|
+
- Optionally specify multiple candidates for the image through the `srcSet` attribute.
|
|
13
|
+
For example, provide small, medium, and large variants for various screen sizes.
|
|
14
|
+
This prevents unnecessary downloading of large files.
|
|
15
|
+
Do this especially for the main image of a page, where the difference between sizes on a narrow and wide screen is most significant.
|
|
16
|
+
- Ensure that the aspect ratio of the image is supported by the [Aspect Ratio](?path=/docs/layout-aspect-ratio--docs) component.
|
|
18
17
|
|
|
19
|
-
##
|
|
18
|
+
## Relevant WCAG Requirements
|
|
20
19
|
|
|
21
|
-
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content):
|
|
22
|
-
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text):
|
|
23
|
-
- [WCAG 1.4.9](https://www.w3.org/TR/WCAG22/#images-of-text-no-exception):
|
|
20
|
+
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content): Non-text content must have a text alternative.
|
|
21
|
+
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text): Use text instead of images of text.
|
|
22
|
+
- [WCAG 1.4.9](https://www.w3.org/TR/WCAG22/#images-of-text-no-exception): Use images of text only when there is no alternative.
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* Append here */
|
|
7
|
+
@import "./link-list/link-list";
|
|
8
|
+
@import "./badge/badge";
|
|
9
|
+
@import "./table/table";
|
|
10
|
+
@import "./mega-menu/mega-menu";
|
|
11
|
+
@import "./icon-button/icon-button";
|
|
7
12
|
@import "./skip-link/skip-link";
|
|
8
13
|
@import "./overlap/overlap";
|
|
9
14
|
@import "./header/header";
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
# Link
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A link is a navigation element and can be used independently or inline with text.
|
|
4
|
+
It is the lightweight variant for navigation.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Use a link in the following cases:
|
|
8
9
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
- To navigate to another page within the website or application
|
|
11
|
+
- To navigate to another website (see [External links](#external-links))
|
|
12
|
+
- To navigate to an element on the same page
|
|
13
|
+
- To link to emails or phone numbers (start the link with `mailto:` or `tel:`)
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
A link is a navigation component.
|
|
16
|
+
Use a button instead of a link when an action is desired.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
TODO: According to the spec, you should use a link for downloads as well. Last time I checked, different browsers handled this differently,
|
|
18
|
-
which led to unexpected results. Maybe that changed in the meantime. Do we want to figure this out and describe this in the docs as well?
|
|
19
|
-
-->
|
|
18
|
+
### External links
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Always include `rel="external"` for an external link.
|
|
21
|
+
Avoid `target="_blank"`, but use `rel="external noopener"` if necessary.
|
|
22
|
+
For more information: [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
### Visited style
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
Visited links indicate that a user has already opened the link.
|
|
27
|
+
We discourage using styles for visited links because they often make the page less clear and navigation more challenging.
|
|
28
|
+
The inline link does have a visited style.
|
|
29
|
+
It is not part of navigation elements that are frequently scanned.
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Relevante WCAG eisen
|
|
31
|
+
## Relevant WCAG Requirements
|
|
30
32
|
|
|
31
33
|
- [WCAG 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum)
|
|
32
34
|
- [WCAG 2.4.4](https://www.w3.org/TR/WCAG21/#link-purpose-in-context)
|
|
33
35
|
- [WCAG 2.5.3](https://www.w3.org/TR/WCAG21/#label-in-name)
|
|
34
36
|
- [WCAG 3.1.2](https://www.w3.org/TR/WCAG21/#language-of-parts)
|
|
35
37
|
|
|
36
|
-
##
|
|
38
|
+
## References
|
|
37
39
|
|
|
38
|
-
- [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/):
|
|
39
|
-
- [_A comprehensive guide to designing perfect links in UX_,
|
|
40
|
-
- [_Writing Hyperlinks: Salient, Descriptive, Start with Keyword_
|
|
41
|
-
- [_Hover, focus, active_,
|
|
42
|
-
- [MDN: `<a>`: The Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a):
|
|
40
|
+
- [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/): Avoid `target="_blank"` or use `rel="external noopener"` if necessary.
|
|
41
|
+
- [_A comprehensive guide to designing perfect links in UX_, on Prototypr](https://blog.prototypr.io/a-guide-to-designing-perfect-links-in-ux-414558f35730): Best practices for links.
|
|
42
|
+
- [_Writing Hyperlinks: Salient, Descriptive, Start with Keyword_ by Norman Nielsen Group](https://www.nngroup.com/articles/writing-links/): How to write good links? An extensive article on links.
|
|
43
|
+
- [_Hover, focus, active_, by Wunder](https://wunder.io/wunderpedia/accessibility/accessible-uis/hover-focus-active/): A good explanation of the states that elements like links and buttons have in browsers.
|
|
44
|
+
- [MDN: `<a>`: The Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a): Comprehensive overview of all possibilities of links in HTML.
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
|
|
23
23
|
.amsterdam-link--standalone {
|
|
24
24
|
display: inline-block;
|
|
25
|
-
font-size: var(--amsterdam-link-standalone-
|
|
26
|
-
line-height: var(--amsterdam-link-standalone-
|
|
25
|
+
font-size: var(--amsterdam-link-standalone-font-size);
|
|
26
|
+
line-height: var(--amsterdam-link-standalone-line-height);
|
|
27
27
|
text-decoration-line: var(--amsterdam-link-standalone-text-decoration-line);
|
|
28
28
|
text-decoration-thickness: var(--amsterdam-link-standalone-text-decoration-thickness);
|
|
29
29
|
text-underline-offset: var(--amsterdam-link-standalone-text-underline-offset);
|
|
@@ -32,11 +32,6 @@
|
|
|
32
32
|
text-decoration-thickness: var(--amsterdam-link-standalone-hover-text-decoration-thickness);
|
|
33
33
|
text-underline-offset: var(--amsterdam-link-standalone-hover-text-underline-offset);
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
.amsterdam-theme--compact & {
|
|
37
|
-
font-size: var(--amsterdam-link-standalone-compact-font-size);
|
|
38
|
-
line-height: var(--amsterdam-link-standalone-compact-line-height);
|
|
39
|
-
}
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
.amsterdam-link--inline {
|
|
@@ -57,34 +52,6 @@
|
|
|
57
52
|
}
|
|
58
53
|
}
|
|
59
54
|
|
|
60
|
-
.amsterdam-link--in-list {
|
|
61
|
-
align-items: flex-start;
|
|
62
|
-
display: inline-flex;
|
|
63
|
-
font-size: var(--amsterdam-link-in-list-spacious-font-size);
|
|
64
|
-
gap: var(--amsterdam-link-in-list-gap);
|
|
65
|
-
line-height: var(--amsterdam-link-in-list-spacious-line-height);
|
|
66
|
-
text-decoration-line: var(--amsterdam-link-in-list-text-decoration-line);
|
|
67
|
-
text-decoration-thickness: var(--amsterdam-link-in-list-text-decoration-thickness);
|
|
68
|
-
text-underline-offset: var(--amsterdam-link-in-list-text-underline-offset);
|
|
69
|
-
|
|
70
|
-
&:hover {
|
|
71
|
-
text-decoration-line: var(--amsterdam-link-in-list-hover-text-decoration-line);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.amsterdam-theme--compact & {
|
|
75
|
-
font-size: var(--amsterdam-link-in-list-compact-font-size);
|
|
76
|
-
line-height: var(--amsterdam-link-in-list-compact-line-height);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Override for icon size
|
|
81
|
-
.amsterdam-link--in-list__chevron {
|
|
82
|
-
span.amsterdam-icon svg {
|
|
83
|
-
height: 1rem;
|
|
84
|
-
width: 1rem;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
55
|
.amsterdam-link--on-background-dark {
|
|
89
56
|
color: var(--amsterdam-link-on-background-dark-color);
|
|
90
57
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Link List
|
|
2
|
+
|
|
3
|
+
A collection of related links.
|
|
4
|
+
|
|
5
|
+
## Design
|
|
6
|
+
|
|
7
|
+
Every list item starts with a chevron.
|
|
8
|
+
It emphasizes the list structure and thematic coherence.
|
|
9
|
+
The chevron is part of the link.
|
|
10
|
+
Therefore, it is blue and clickable.
|
|
11
|
+
|
|
12
|
+
## Guidelines
|
|
13
|
+
|
|
14
|
+
Use a Link List to present multiple links within a theme.
|
|
15
|
+
|
|
16
|
+
For additional guidelines, refer to the [Link](?path=/docs/navigation-link--docs) component.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2024 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
|
|
8
|
+
@mixin reset-list {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
list-style: none;
|
|
11
|
+
margin-block: 0;
|
|
12
|
+
padding-inline-start: 0;
|
|
13
|
+
-webkit-text-size-adjust: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.amsterdam-link-list {
|
|
17
|
+
@include reset-list;
|
|
18
|
+
|
|
19
|
+
display: grid;
|
|
20
|
+
gap: var(--amsterdam-link-list-gap);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.amsterdam-link-list__link {
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
color: var(--amsterdam-link-list-link-color);
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
font-family: var(--amsterdam-link-list-link-font-family);
|
|
28
|
+
font-size: var(--amsterdam-link-list-link-medium-font-size);
|
|
29
|
+
font-weight: var(--amsterdam-link-list-link-font-weight);
|
|
30
|
+
gap: var(--amsterdam-link-list-link-gap);
|
|
31
|
+
line-height: var(--amsterdam-link-list-link-medium-line-height);
|
|
32
|
+
outline-offset: var(--amsterdam-link-list-link-outline-offset);
|
|
33
|
+
text-decoration-line: var(--amsterdam-link-list-link-text-decoration-line);
|
|
34
|
+
text-decoration-thickness: var(--amsterdam-link-list-link-text-decoration-thickness);
|
|
35
|
+
text-underline-offset: var(--amsterdam-link-list-link-text-underline-offset);
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
color: var(--amsterdam-link-list-link-hover-color);
|
|
39
|
+
text-decoration-line: var(--amsterdam-link-list-link-hover-text-decoration-line);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.amsterdam-link-list__link--small {
|
|
44
|
+
font-size: var(--amsterdam-link-list-link-small-font-size);
|
|
45
|
+
line-height: var(--amsterdam-link-list-link-small-line-height);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.amsterdam-link-list__link--large {
|
|
49
|
+
font-size: var(--amsterdam-link-list-link-large-font-size);
|
|
50
|
+
line-height: var(--amsterdam-link-list-link-large-line-height);
|
|
51
|
+
|
|
52
|
+
@include hyphenation;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.amsterdam-link-list__link--on-background-dark {
|
|
56
|
+
color: var(--amsterdam-link-list-link-on-background-dark-color);
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
color: var(--amsterdam-link-list-link-on-background-dark-hover-color);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.amsterdam-link-list__link--on-background-light {
|
|
64
|
+
color: var(--amsterdam-link-list-link-on-background-light-color);
|
|
65
|
+
|
|
66
|
+
&:hover {
|
|
67
|
+
color: var(--amsterdam-link-list-link-on-background-light-hover-color);
|
|
68
|
+
}
|
|
69
|
+
}
|