@amsterdam/design-system-css 0.2.0 → 0.4.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 +51 -0
- package/LICENSE.md +1 -1
- package/README.md +2 -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/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.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/grid/grid.css +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/header/header.css +1 -0
- package/dist/header/header.css.map +1 -0
- 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/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/link-list/link-list.css +1 -0
- package/dist/link-list/link-list.css.map +1 -0
- package/dist/logo/logo.css +1 -1
- package/dist/logo/logo.css.map +1 -1
- package/dist/mark/mark.css +1 -0
- package/dist/mark/mark.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/overlap/overlap.css +1 -0
- package/dist/overlap/overlap.css.map +1 -0
- package/dist/page-menu/page-menu.css +1 -1
- package/dist/page-menu/page-menu.css.map +1 -1
- package/dist/search-field/search-field.css +1 -0
- package/dist/search-field/search-field.css.map +1 -0
- package/dist/skip-link/skip-link.css +1 -0
- package/dist/skip-link/skip-link.css.map +1 -0
- package/dist/spotlight/spotlight.css +1 -0
- package/dist/spotlight/spotlight.css.map +1 -0
- package/dist/table/table.css +1 -0
- package/dist/table/table.css.map +1 -0
- package/dist/text-input/text-input.css +1 -0
- package/dist/text-input/text-input.css.map +1 -0
- package/dist/visually-hidden/visually-hidden.css +1 -1
- package/dist/visually-hidden/visually-hidden.css.map +1 -1
- package/documentation/coding-conventions.md +4 -2
- package/package.json +5 -5
- package/src/components/accordion/README.md +45 -38
- 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 +58 -0
- package/src/components/blockquote/README.md +8 -8
- package/src/components/breadcrumb/README.md +10 -7
- package/src/components/breadcrumb/breadcrumb.scss +6 -15
- package/src/components/button/README.md +17 -14
- package/src/components/card/README.md +18 -6
- package/src/components/checkbox/README.md +19 -18
- package/src/components/checkbox/checkbox.scss +3 -3
- package/src/components/dialog/README.md +9 -8
- package/src/components/dialog/dialog.scss +0 -17
- package/src/components/footer/README.md +11 -7
- package/src/components/form-label/README.md +5 -1
- package/src/components/grid/README.md +20 -0
- package/src/components/grid/grid.scss +44 -0
- package/src/components/header/README.md +14 -0
- package/src/components/header/header.scss +85 -0
- package/src/components/heading/README.md +14 -11
- package/src/components/heading/heading.scss +20 -0
- package/src/components/icon/README.md +19 -9
- package/src/components/icon/icon.scss +5 -18
- 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 -12
- package/src/components/image/image.scss +4 -0
- package/src/components/index.scss +12 -2
- package/src/components/link/README.md +26 -24
- package/src/components/link-list/README.md +16 -0
- package/src/components/link-list/link-list.scss +80 -0
- package/src/components/logo/README.md +21 -20
- package/src/components/logo/logo.scss +1 -0
- package/src/components/mark/README.md +17 -0
- package/src/components/mark/mark.scss +8 -0
- 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/overlap/README.md +3 -0
- package/src/components/overlap/overlap.scss +12 -0
- package/src/components/page-heading/README.md +10 -9
- package/src/components/page-menu/README.md +10 -9
- package/src/components/page-menu/page-menu.scss +2 -18
- package/src/components/pagination/README.md +13 -10
- package/src/components/paragraph/README.md +16 -14
- package/src/components/screen/README.md +12 -12
- package/src/components/search-field/README.md +33 -0
- package/src/components/search-field/search-field.scss +73 -0
- package/src/components/skip-link/README.md +26 -0
- package/src/components/skip-link/skip-link.scss +28 -0
- package/src/components/spotlight/README.md +15 -0
- package/src/components/spotlight/spotlight.scss +36 -0
- 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 +14 -0
- package/src/components/text-input/text-input.scss +57 -0
- package/src/components/top-task-link/README.md +15 -14
- package/src/components/unordered-list/README.md +5 -5
- package/src/components/visually-hidden/README.md +3 -2
- package/src/components/visually-hidden/visually-hidden.scss +4 -6
- package/dist/grid/grid-cell.css +0 -1
- package/dist/grid/grid-cell.css.map +0 -1
- package/dist/highlight/highlight.css +0 -1
- package/dist/highlight/highlight.css.map +0 -1
- 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/grid/README.grid-cell.md +0 -14
- package/src/components/grid/README.grid.md +0 -17
- package/src/components/grid/grid-cell.scss +0 -46
- package/src/components/heading/heading-css.md +0 -3
- package/src/components/highlight/README.md +0 -15
- package/src/components/highlight/highlight.scss +0 -36
- package/src/components/paragraph/paragraph-css.md +0 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2024 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin reset-list {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
list-style: none;
|
|
9
|
+
margin-block: 0;
|
|
10
|
+
padding-inline-start: 0;
|
|
11
|
+
-webkit-text-size-adjust: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.amsterdam-link-list {
|
|
15
|
+
@include reset-list;
|
|
16
|
+
|
|
17
|
+
display: grid;
|
|
18
|
+
gap: var(--amsterdam-link-list-gap);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.amsterdam-link-list__link {
|
|
22
|
+
align-items: flex-start;
|
|
23
|
+
color: var(--amsterdam-link-list-link-color);
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
font-family: var(--amsterdam-link-list-link-font-family);
|
|
26
|
+
font-size: var(--amsterdam-link-list-link-spacious-medium-font-size);
|
|
27
|
+
font-weight: var(--amsterdam-link-list-link-font-weight);
|
|
28
|
+
gap: var(--amsterdam-link-list-link-gap);
|
|
29
|
+
line-height: var(--amsterdam-link-list-link-spacious-medium-line-height);
|
|
30
|
+
outline-offset: var(--amsterdam-link-list-link-outline-offset);
|
|
31
|
+
text-decoration-line: var(--amsterdam-link-list-link-text-decoration-line);
|
|
32
|
+
text-decoration-thickness: var(--amsterdam-link-list-link-text-decoration-thickness);
|
|
33
|
+
text-underline-offset: var(--amsterdam-link-list-link-text-underline-offset);
|
|
34
|
+
|
|
35
|
+
.amsterdam-theme--compact & {
|
|
36
|
+
font-size: var(--amsterdam-link-list-link-compact-medium-font-size);
|
|
37
|
+
line-height: var(--amsterdam-link-list-link-compact-medium-line-height);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
color: var(--amsterdam-link-list-link-hover-color);
|
|
42
|
+
text-decoration-line: var(--amsterdam-link-list-link-hover-text-decoration-line);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.amsterdam-link-list__link--small {
|
|
47
|
+
font-size: var(--amsterdam-link-list-link-spacious-small-font-size);
|
|
48
|
+
line-height: var(--amsterdam-link-list-link-spacious-small-line-height);
|
|
49
|
+
|
|
50
|
+
.amsterdam-theme--compact & {
|
|
51
|
+
font-size: var(--amsterdam-link-list-link-compact-small-font-size);
|
|
52
|
+
line-height: var(--amsterdam-link-list-link-compact-small-line-height);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.amsterdam-link-list__link--large {
|
|
57
|
+
font-size: var(--amsterdam-link-list-link-spacious-large-font-size);
|
|
58
|
+
line-height: var(--amsterdam-link-list-link-spacious-large-line-height);
|
|
59
|
+
|
|
60
|
+
.amsterdam-theme--compact & {
|
|
61
|
+
font-size: var(--amsterdam-link-list-link-compact-large-font-size);
|
|
62
|
+
line-height: var(--amsterdam-link-list-link-compact-large-line-height);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.amsterdam-link-list__link--on-background-dark {
|
|
67
|
+
color: var(--amsterdam-link-list-link-on-background-dark-color);
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
color: var(--amsterdam-link-list-link-on-background-dark-hover-color);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.amsterdam-link-list__link--on-background-light {
|
|
75
|
+
color: var(--amsterdam-link-list-link-on-background-light-color);
|
|
76
|
+
|
|
77
|
+
&:hover {
|
|
78
|
+
color: var(--amsterdam-link-list-link-on-background-light-hover-color);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
# Logo
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The City’s logo includes an icon (3 Saint Andrew’s crosses) and a wordmark (Gemeente Amsterdam).
|
|
4
|
+
The logo has a fixed colour, size, and position and is present on all our websites.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Specifications
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
In
|
|
8
|
+
The design system provides the correct logo for online use.
|
|
9
|
+
Other logo variations exist, but they cannot be used on websites and in applications.
|
|
10
|
+
The Dutch logo is for websites in the Dutch language and any language other than English.
|
|
11
|
+
The English logo is used for websites in the English language.
|
|
12
|
+
(We will add this logo to the design system later.)
|
|
13
|
+
In the meantime, you can download an image of this logo from [Stijlweb](https://amsterdam.nl/stijlweb/basiselementen/logo-gemeente-amsterdam/#hba498e5c-2388-464f-b769-7622a5d32bd1).
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Exception
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Use a sub-brand logo if the website is owned by one of the 4 sub-brands.
|
|
18
|
+
They have a separate status because of their unique service provision not directly associated with the City.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The sub-brands are:
|
|
21
21
|
|
|
22
22
|
- GGD Amsterdam
|
|
23
23
|
- Stadsarchief
|
|
24
24
|
- Stadsbank van Lening
|
|
25
25
|
- VGA Verzekeringen
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Requirements for all logos
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
29
|
+
- The logo is always displayed.
|
|
30
|
+
- The logo is left-aligned in the header.
|
|
31
|
+
- The logo links to the homepage of the website or application.
|
|
32
|
+
- If the application is a form, application, or tool without a homepage, the logo links to the page where the form, application, or tool is referred to.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The height of the logo is always 40 pixels.
|
|
35
|
+
This also applies to sub-brand logos.
|
|
35
36
|
|
|
36
37
|
## Download
|
|
37
38
|
|
|
38
|
-
- [
|
|
39
|
+
- [Logo set for websites and apps (ZIP, 10 kB)](https://assets.amsterdam.nl/publish/pages/1007650/logoset_voor_websites_en_apps.zip)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Mark
|
|
2
|
+
|
|
3
|
+
Highlights a text fragment using a yellow background.
|
|
4
|
+
Provides strong emphasis on the text and draws attention to it.
|
|
5
|
+
|
|
6
|
+
## Guidelines
|
|
7
|
+
|
|
8
|
+
### How to Use
|
|
9
|
+
|
|
10
|
+
- Use a maximum of 1 mark per page.
|
|
11
|
+
- Limit the marked text to 1 sentence.
|
|
12
|
+
|
|
13
|
+
### Avoid This
|
|
14
|
+
|
|
15
|
+
- Do not use it in titles and subtitles.
|
|
16
|
+
Use a significant and engaging title if the entire paragraph is important.
|
|
17
|
+
- Do not mark an entire paragraph.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Mega Menu
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.amsterdam-mega-menu__list-category {
|
|
7
|
+
column-gap: var(--amsterdam-mega-menu-list-category-column-gap);
|
|
8
|
+
column-width: var(--amsterdam-mega-menu-list-category-column-width);
|
|
9
|
+
padding-block-start: var(--amsterdam-mega-menu-list-category-padding-block-start);
|
|
10
|
+
|
|
11
|
+
&:not(:last-child) {
|
|
12
|
+
padding-block-end: var(--amsterdam-mega-menu-list-category-padding-block-end);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Ordered List
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
An ordered list is a vertical group of related content with an order.
|
|
4
|
+
This list can have 2 levels.
|
|
5
|
+
The first level has numbers as list markers.
|
|
6
|
+
The second level uses letters in alphabetical order.
|
|
7
|
+
List items indent their text by a fixed distance.
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# Page Heading
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The page heading component is a prominent text at the beginning of a page, immediately after the header.
|
|
4
|
+
Use this component for a name, title, or motto.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Guidelines
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
- Use this component to capture the user’s attention.
|
|
9
|
+
- Only use this component once per page, typically only on the homepage.
|
|
10
|
+
- Avoid using it if you need to display long pieces of text; the text should be short and precise.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Relevant WCAG Requirements
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The page heading component is a variant of a heading level 1 with a distinct style.
|
|
15
|
+
When using this component, ensure that the heading hierarchy of the page remains logical.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
For this component, the same WCAG requirements apply as for [the heading component](https://amsterdam.github.io/design-system/?path=/docs/react_text-heading--docs).
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
# Page Menu
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A small set of links for use in the Header and Footer.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
- Limit the amount of menu items in the Header to 5 items or less, including ‘Search’ and ‘Menu’.
|
|
8
|
+
- The menu should fit on a single line and is right-aligned.
|
|
9
|
+
- The menu in the footer is left-aligned.
|
|
10
|
+
- Submenus are not allowed.
|
|
11
|
+
- The ‘Menu’ button opens the Mega Menu.
|
|
12
|
+
- On narrow screens, menu items other than ‘Search’ and ‘Menu’ move from the Page Menu to the Mega Menu.
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Relevant WCAG Requirements
|
|
14
15
|
|
|
15
16
|
- [Consistent Navigation (Level AA)](https://www.w3.org/WAI/WCAG21/Understanding/consistent-navigation.html)
|
|
16
17
|
|
|
17
|
-
PageMenu is
|
|
18
|
+
PageMenu is an interactive element, and the [general requirements and guidelines for interactive elements](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) apply.
|
|
@@ -14,19 +14,11 @@
|
|
|
14
14
|
-webkit-text-size-adjust: 100%;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
@mixin reset-button {
|
|
18
|
-
background-color: transparent;
|
|
19
|
-
border: 0;
|
|
20
|
-
margin-block: 0;
|
|
21
|
-
padding-inline: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
17
|
.amsterdam-page-menu {
|
|
25
18
|
align-items: center;
|
|
26
19
|
column-gap: var(--amsterdam-page-menu-column-gap);
|
|
27
20
|
display: flex;
|
|
28
21
|
flex-direction: row;
|
|
29
|
-
flex-wrap: wrap;
|
|
30
22
|
list-style: none;
|
|
31
23
|
row-gap: var(--amsterdam-page-menu-row-gap);
|
|
32
24
|
|
|
@@ -52,6 +44,7 @@
|
|
|
52
44
|
text-decoration-thickness: var(--amsterdam-page-menu-item-text-decoration-thickness);
|
|
53
45
|
text-underline-offset: var(--amsterdam-page-menu-item-text-underline-offset);
|
|
54
46
|
touch-action: manipulation;
|
|
47
|
+
white-space: nowrap;
|
|
55
48
|
|
|
56
49
|
.amsterdam-theme--compact & {
|
|
57
50
|
font-size: var(--amsterdam-page-menu-item-compact-font-size);
|
|
@@ -64,21 +57,12 @@
|
|
|
64
57
|
@include reset-item;
|
|
65
58
|
}
|
|
66
59
|
|
|
67
|
-
.amsterdam-page-menu__button {
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
|
|
70
|
-
@include reset-item;
|
|
71
|
-
@include reset-button;
|
|
72
|
-
@include page-menu-item;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
60
|
.amsterdam-page-menu__link:hover,
|
|
76
61
|
.amsterdam-page-menu__button:hover {
|
|
77
62
|
color: var(--amsterdam-page-menu-item-hover-color);
|
|
78
63
|
text-decoration-line: var(--amsterdam-page-menu-item-hover-text-decoration-line);
|
|
79
64
|
}
|
|
80
65
|
|
|
81
|
-
.amsterdam-page-menu__link svg
|
|
82
|
-
.amsterdam-page-menu__button svg {
|
|
66
|
+
.amsterdam-page-menu__link svg {
|
|
83
67
|
color: currentColor;
|
|
84
68
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# Pagination
|
|
2
2
|
|
|
3
|
-
Pagination
|
|
3
|
+
Pagination is a navigation element used to navigate between multiple pages of overview lists.
|
|
4
|
+
This is commonly used for search results or a list of news articles.
|
|
5
|
+
In cases where overview lists are too long to display on a single page, pagination can provide a clearer and more functional way to divide the content across multiple pages.
|
|
6
|
+
Pagination indicates the current page and allows users to navigate to other pages.
|
|
4
7
|
|
|
5
|
-
##
|
|
8
|
+
## Guidelines
|
|
6
9
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- Start
|
|
10
|
+
- Use pagination only when an overview list is too long to display on a single page.
|
|
11
|
+
- Place pagination below the overview list.
|
|
12
|
+
- Pagination should not be displayed if there is only one page.
|
|
13
|
+
- Redirect users to the first page if they enter a URL with a page number that doesn’t exist.
|
|
14
|
+
- Pagination can be combined with a counter at the top of the page indicating “Page # of ##.”
|
|
15
|
+
- Start a page with an overview list at the top after changing the page.
|
|
13
16
|
|
|
14
|
-
##
|
|
17
|
+
## Relevant WCAG Rules
|
|
15
18
|
|
|
16
|
-
Pagination is
|
|
19
|
+
Pagination is an interactive element, and the [general requirements and guidelines for interactive elements](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) apply.
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
# Paragraph
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Represents a paragraph of running text, form instructions, and other standalone text fragments.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
7
|
+
- Group sentences that belong together into a paragraph.
|
|
8
|
+
Start a new paragraph when the text shifts to a different topic or has its own purpose.
|
|
9
|
+
- Consider whether a paragraph with more than 7 sentences or 140 words would be clearer if you divide the text into two paragraphs.
|
|
10
|
+
Texts with not overly long paragraphs are easier to understand, and grouping makes information quicker to locate.
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Relevant WCAG Rules
|
|
11
13
|
|
|
12
|
-
- [WCAG 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships):
|
|
13
|
-
- [WCAG 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum):
|
|
14
|
-
- [WCAG 1.4.4](https://www.w3.org/TR/WCAG21/#resize-text):
|
|
15
|
-
- [WCAG 1.4.10](https://www.w3.org/TR/WCAG21/#reflow):
|
|
16
|
-
- [WCAG 1.4.12](https://www.w3.org/TR/WCAG21/#text-spacing):
|
|
17
|
-
- [WCAG 3.1.2](https://www.w3.org/TR/WCAG21/#language-of-parts):
|
|
18
|
-
- [WCAG 1.4.6](https://www.w3.org/TR/WCAG21/#contrast-enhanced):
|
|
19
|
-
- [WCAG 1.4.8](https://www.w3.org/TR/WCAG21/#visual-presentation): We
|
|
14
|
+
- [WCAG 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships): Blocks that look like a paragraph are also recognized by a computer as a paragraph.
|
|
15
|
+
- [WCAG 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum): The contrast of black text on a white background is high enough.
|
|
16
|
+
- [WCAG 1.4.4](https://www.w3.org/TR/WCAG21/#resize-text): Text can be resized up to twice its default size.
|
|
17
|
+
- [WCAG 1.4.10](https://www.w3.org/TR/WCAG21/#reflow): If the text is wider than the viewport, scrolling is not necessary to see all the text.
|
|
18
|
+
- [WCAG 1.4.12](https://www.w3.org/TR/WCAG21/#text-spacing): The mentioned style properties can be adjusted without making the text unreadable.
|
|
19
|
+
- [WCAG 3.1.2](https://www.w3.org/TR/WCAG21/#language-of-parts): It is possible to indicate the language of the text.
|
|
20
|
+
- [WCAG 1.4.6](https://www.w3.org/TR/WCAG21/#contrast-enhanced): The contrast of black text on a white background is higher than 7:1.
|
|
21
|
+
- [WCAG 1.4.8](https://www.w3.org/TR/WCAG21/#visual-presentation): We do not meet all these requirements.
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## References
|
|
22
24
|
|
|
23
25
|
- [MDN: `<p>`: The Paragraph element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p)
|
|
24
26
|
- [Hoe lang mag een alinea zijn? En waar hangt dat van af? - Taaladvies.net](https://taaladvies.net/lengte-van-alineas/)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Screen
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manages the maximum width and alignment of the entire website or application.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
This should be the outermost component of your website or application.
|
|
8
|
+
Within it, combine components such as
|
|
9
9
|
[Grid](?path=/docs/react_layout-grid--docs),
|
|
10
|
-
Header,
|
|
10
|
+
[Header](?path=/docs/react_containers-header--docs),
|
|
11
11
|
[Footer](?path=/docs/react_containers-footer--docs),
|
|
12
|
-
[
|
|
13
|
-
|
|
12
|
+
[Spotlight](?path=/docs/react_containers-spotlight--docs),
|
|
13
|
+
and Figure.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Design
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
By default, this component expands to a width of 1600 pixels.
|
|
18
|
+
This is the maximum width for a website of the City of Amsterdam.
|
|
19
|
+
For applications, you can choose a larger maximum width of 2112 pixels.
|
|
20
|
+
The component horizontally centres both itself and its content.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Search Field
|
|
2
|
+
|
|
3
|
+
Allows users to quickly find relevant content by entering a (part of a) word or phrase to search through the content.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
- Users can initiate a search by using the search button or the Enter key.
|
|
8
|
+
|
|
9
|
+
## Autofocus
|
|
10
|
+
|
|
11
|
+
You can use `autofocus` to place focus directly on a search field when the user arrives on a page.
|
|
12
|
+
However, use this feature with caution, as it can have negative consequences:
|
|
13
|
+
|
|
14
|
+
- For screen reader users, this may result in skipping important content above the search field.
|
|
15
|
+
- On smaller devices, the use of `autofocus` may automatically scroll the page to the search field, potentially causing users to miss previous content.
|
|
16
|
+
- On touchscreen devices, this can trigger the keyboard to appear immediately, hiding important content.
|
|
17
|
+
|
|
18
|
+
Use `autofocus` only if the search field is at the beginning of a page and there are no other elements on a page that a user might want to interact with first.
|
|
19
|
+
|
|
20
|
+
For more information: [Accessibility Tips: Be Cautious When Using Autofocus](https://www.boia.org/blog/accessibility-tips-be-cautious-when-using-autofocus)
|
|
21
|
+
|
|
22
|
+
## `autocomplete` and `spellcheck`
|
|
23
|
+
|
|
24
|
+
Both `autocomplete` and `spellcheck` are turned off by default.
|
|
25
|
+
These features can be disruptive for a user searching for part of a word, and `autocomplete` may interfere with an Autosuggest component.
|
|
26
|
+
|
|
27
|
+
## Relevant WCAG Requirements
|
|
28
|
+
|
|
29
|
+
- [WCAG 1.3.1](https://www.w3.org/TR/WCAG22/#info-and-relationships): `role="search"` is used for the search landmark role.
|
|
30
|
+
- [WCAG 1.3.5](https://www.w3.org/TR/WCAG22/#identify-input-purpose): It is clear both to the user and programmatically what the purpose of a form field is.
|
|
31
|
+
- [WCAG 2.4.6](https://www.w3.org/TR/WCAG22/#headings-and-labels): There is a label describing the purpose of the input.
|
|
32
|
+
|
|
33
|
+
Search Field is an interactive element; therefore, [the general requirements and guidelines for interactive elements](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) apply.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.amsterdam-search-field {
|
|
7
|
+
display: flex;
|
|
8
|
+
isolation: isolate; // create new stacking context, so the input’s z-index doesn’t escape the component
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin reset {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
margin-block: 0;
|
|
14
|
+
-webkit-text-size-adjust: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.amsterdam-search-field__input {
|
|
18
|
+
border: none;
|
|
19
|
+
box-shadow: var(--amsterdam-search-field-input-box-shadow);
|
|
20
|
+
color: var(--amsterdam-search-field-input-color);
|
|
21
|
+
font-family: var(--amsterdam-search-field-input-font-family);
|
|
22
|
+
font-size: var(--amsterdam-search-field-input-spacious-font-size);
|
|
23
|
+
font-weight: var(--amsterdam-search-field-input-font-weight);
|
|
24
|
+
line-height: var(--amsterdam-search-field-input-spacious-line-height);
|
|
25
|
+
outline-offset: var(--amsterdam-search-field-input-outline-offset);
|
|
26
|
+
padding-block: 0.5rem;
|
|
27
|
+
padding-inline: 1rem;
|
|
28
|
+
touch-action: manipulation;
|
|
29
|
+
width: 100%;
|
|
30
|
+
|
|
31
|
+
@include reset;
|
|
32
|
+
|
|
33
|
+
.amsterdam-theme--compact & {
|
|
34
|
+
font-size: var(--amsterdam-search-field-input-compact-font-size);
|
|
35
|
+
line-height: var(--amsterdam-search-field-input-compact-line-height);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
box-shadow: var(--amsterdam-search-field-input-hover-box-shadow);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:focus {
|
|
43
|
+
z-index: 1; // Make sure the focus outline isn’t cut off by the adjacent button
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.amsterdam-search-field__input::placeholder {
|
|
48
|
+
color: var(--amsterdam-search-field-input-placeholder-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.amsterdam-search-field__input::-webkit-search-cancel-button {
|
|
52
|
+
appearance: none;
|
|
53
|
+
background-image: var(--amsterdam-search-field-input-cancel-button-background-image);
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
height: var(--amsterdam-search-field-input-cancel-button-height);
|
|
56
|
+
margin-inline-start: 0.5rem;
|
|
57
|
+
width: var(--amsterdam-search-field-input-cancel-button-width);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.amsterdam-search-field__button {
|
|
61
|
+
background-color: var(--amsterdam-search-field-button-background-color);
|
|
62
|
+
border: 0;
|
|
63
|
+
color: var(--amsterdam-search-field-button-color);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
outline-offset: var(--amsterdam-search-field-button-outline-offset);
|
|
66
|
+
padding-block: 0.5rem;
|
|
67
|
+
padding-inline: 0.5rem;
|
|
68
|
+
touch-action: manipulation;
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
background-color: var(--amsterdam-search-field-button-hover-background-color);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Skip Link
|
|
2
|
+
|
|
3
|
+
Use a Skip Link to navigate to the main content quickly with the keyboard.
|
|
4
|
+
A Skip Link allows skipping recurring navigation blocks, such as the main menu or breadcrumb trail.
|
|
5
|
+
|
|
6
|
+
The Skip Link is placed above the header.
|
|
7
|
+
The link is hidden until activated with the tab key.
|
|
8
|
+
When the link is shown, it pushes the entire page down.
|
|
9
|
+
|
|
10
|
+
## Guidelines
|
|
11
|
+
|
|
12
|
+
### How to Use
|
|
13
|
+
|
|
14
|
+
- Place the Skip Link as the first element in `<body>` unless you have a cookie banner.
|
|
15
|
+
In that case, place the Skip Link immediately after the cookie banner.
|
|
16
|
+
- Use the Skip Link to navigate to the main content.
|
|
17
|
+
On an article page, for example, it could be the title of the article; on a search page, it could be the search field.
|
|
18
|
+
- Set `id="example-id"` on the container of that element and then use `href="#example-id"` on the Skip Link.
|
|
19
|
+
- You can use more than one Skip Link for complex pages with multiple sections.
|
|
20
|
+
In most cases, this is not necessary.
|
|
21
|
+
|
|
22
|
+
### Avoid
|
|
23
|
+
|
|
24
|
+
- Skip Links are unnecessary on a simple page with only text and minimal navigation.
|
|
25
|
+
The purpose of a Skip Link is to bypass recurring navigation blocks.
|
|
26
|
+
If those blocks are not present, a Skip Link is not needed.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.amsterdam-skip-link {
|
|
7
|
+
background-color: var(--amsterdam-skip-link-background-color);
|
|
8
|
+
color: var(--amsterdam-skip-link-color);
|
|
9
|
+
display: block;
|
|
10
|
+
font-family: var(--amsterdam-skip-link-font-family);
|
|
11
|
+
font-size: var(--amsterdam-skip-link-font-size);
|
|
12
|
+
font-weight: var(--amsterdam-skip-link-font-weight);
|
|
13
|
+
line-height: var(--amsterdam-skip-link-line-height);
|
|
14
|
+
outline-offset: var(--amsterdam-skip-link-outline-offset);
|
|
15
|
+
padding-block: 0.5rem;
|
|
16
|
+
padding-inline: 1rem;
|
|
17
|
+
text-align: center;
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: var(--amsterdam-skip-link-hover-background-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.amsterdam-theme--compact & {
|
|
25
|
+
font-size: var(--amsterdam-skip-link-compact-font-size);
|
|
26
|
+
line-height: var(--amsterdam-skip-link-compact-line-height);
|
|
27
|
+
}
|
|
28
|
+
}
|