@amsterdam/design-system-css 0.11.1 → 0.13.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 +42 -17
- package/README.md +69 -40
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/action-group/action-group.css +1 -0
- package/dist/action-group/action-group.css.map +1 -0
- package/dist/avatar/avatar.css +1 -1
- package/dist/avatar/avatar.css.map +1 -1
- package/dist/blockquote/blockquote.css.map +1 -1
- package/dist/breakout/breakout.css +1 -0
- package/dist/breakout/breakout.css.map +1 -0
- package/dist/button/button.css +1 -1
- package/dist/button/button.css.map +1 -1
- package/dist/checkbox/checkbox.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/field/field.css +1 -1
- package/dist/field/field.css.map +1 -1
- package/dist/file-input/file-input.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/hint/hint.css +1 -0
- package/dist/hint/hint.css.map +1 -0
- 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 -0
- package/dist/image-slider/image-slider.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 -1
- package/dist/link-list/link-list.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/pagination/pagination.css +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/password-input/password-input.css +1 -0
- package/dist/password-input/password-input.css.map +1 -0
- package/dist/radio/radio.css +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/screen/screen.css +1 -1
- package/dist/screen/screen.css.map +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/select/select.css.map +1 -1
- package/dist/switch/switch.css +1 -1
- package/dist/switch/switch.css.map +1 -1
- package/dist/tabs/tabs.css +1 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/package.json +11 -6
- package/src/components/accordion/accordion.scss +10 -1
- package/src/components/action-group/README.md +14 -0
- package/src/components/action-group/action-group.scss +15 -0
- package/src/components/avatar/README.md +3 -3
- package/src/components/avatar/avatar.scss +9 -0
- package/src/components/blockquote/blockquote.scss +4 -4
- package/src/components/breadcrumb/README.md +7 -9
- package/src/components/breakout/README.md +5 -0
- package/src/components/breakout/breakout.scss +163 -0
- package/src/components/button/README.md +5 -4
- package/src/components/button/button.scss +16 -7
- package/src/components/card/README.md +5 -1
- package/src/components/checkbox/README.md +1 -1
- package/src/components/checkbox/checkbox.scss +2 -2
- package/src/components/description-list/README.md +6 -5
- package/src/components/description-list/description-list.scss +27 -11
- package/src/components/dialog/README.md +2 -9
- package/src/components/dialog/dialog.scss +13 -30
- package/src/components/field/README.md +1 -1
- package/src/components/field/field.scss +1 -0
- package/src/components/field-set/README.md +2 -0
- package/src/components/file-input/file-input.scss +2 -2
- package/src/components/footer/README.md +4 -4
- package/src/components/gap/README.md +9 -7
- package/src/components/grid/README.md +11 -12
- package/src/components/grid/_mixins.scss +110 -0
- package/src/components/grid/grid.scss +33 -37
- package/src/components/header/README.md +9 -11
- package/src/components/header/header.scss +1 -0
- package/src/components/hint/README.md +9 -0
- package/src/components/hint/hint.scss +9 -0
- package/src/components/icon-button/icon-button.scss +18 -14
- package/src/components/image-slider/README.md +25 -0
- package/src/components/image-slider/image-slider.scss +89 -0
- package/src/components/index.scss +5 -0
- package/src/components/label/README.md +3 -1
- package/src/components/link/README.md +5 -0
- package/src/components/link/link.scss +10 -10
- package/src/components/link-list/README.md +2 -3
- package/src/components/link-list/link-list.scss +6 -6
- package/src/components/margin/README.md +6 -6
- package/src/components/mark/README.md +1 -6
- package/src/components/ordered-list/README.md +5 -0
- package/src/components/ordered-list/ordered-list.scss +3 -5
- package/src/components/page-menu/README.md +5 -1
- package/src/components/pagination/pagination.scss +6 -6
- package/src/components/password-input/README.md +29 -0
- package/src/components/password-input/password-input.scss +59 -0
- package/src/components/radio/README.md +2 -2
- package/src/components/radio/radio.scss +123 -90
- package/src/components/screen/README.md +9 -8
- package/src/components/screen/screen.scss +1 -0
- package/src/components/search-field/README.md +1 -1
- package/src/components/search-field/search-field.scss +3 -3
- package/src/components/select/select.scss +2 -2
- package/src/components/skip-link/README.md +0 -5
- package/src/components/spotlight/README.md +2 -1
- package/src/components/switch/README.md +2 -2
- package/src/components/switch/switch.scss +9 -6
- package/src/components/tabs/README.md +3 -1
- package/src/components/tabs/tabs.scss +12 -0
- package/src/components/text-input/README.md +1 -1
- package/src/components/top-task-link/README.md +4 -0
- package/src/components/unordered-list/README.md +6 -0
- package/src/components/unordered-list/unordered-list.scss +3 -5
|
@@ -13,19 +13,33 @@
|
|
|
13
13
|
|
|
14
14
|
.ams-description-list {
|
|
15
15
|
color: var(--ams-description-list-color);
|
|
16
|
+
column-gap: var(--ams-description-list-column-gap);
|
|
16
17
|
display: grid;
|
|
17
18
|
font-family: var(--ams-description-list-font-family);
|
|
18
19
|
font-size: var(--ams-description-list-font-size);
|
|
19
|
-
font-weight: var(--ams-description-list-font-weight);
|
|
20
|
-
gap: var(--ams-description-list-gap);
|
|
21
20
|
line-height: var(--ams-description-list-line-height);
|
|
21
|
+
row-gap: var(--ams-description-list-row-gap);
|
|
22
22
|
|
|
23
|
-
@
|
|
23
|
+
@include reset;
|
|
24
|
+
@include text-rendering;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
28
|
+
.ams-description-list {
|
|
29
|
+
grid-template-columns: auto 1fr;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ams-description-list--terms-width-sm {
|
|
33
|
+
grid-template-columns: 1fr 4fr;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ams-description-list--terms-width-md {
|
|
24
37
|
grid-template-columns: 1fr 2fr;
|
|
25
38
|
}
|
|
26
39
|
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
.ams-description-list--terms-width-lg {
|
|
41
|
+
grid-template-columns: 1fr 1fr;
|
|
42
|
+
}
|
|
29
43
|
}
|
|
30
44
|
|
|
31
45
|
.ams-description-list--inverse-color {
|
|
@@ -33,23 +47,25 @@
|
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
.ams-description-list__term {
|
|
50
|
+
font-weight: var(--ams-description-list-term-font-weight);
|
|
51
|
+
|
|
36
52
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
37
53
|
grid-column-start: 1;
|
|
38
54
|
}
|
|
39
55
|
}
|
|
40
56
|
|
|
41
|
-
@mixin reset-
|
|
57
|
+
@mixin reset-description {
|
|
42
58
|
margin-inline: 0;
|
|
43
59
|
}
|
|
44
60
|
|
|
45
|
-
.ams-description-
|
|
46
|
-
font-weight: var(--ams-description-list-
|
|
47
|
-
padding-inline-start: var(--ams-description-list-
|
|
61
|
+
.ams-description-list__description {
|
|
62
|
+
font-weight: var(--ams-description-list-description-font-weight);
|
|
63
|
+
padding-inline-start: var(--ams-description-list-description-padding-inline-start);
|
|
64
|
+
|
|
65
|
+
@include reset-description;
|
|
48
66
|
|
|
49
67
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
50
68
|
grid-column-start: 2;
|
|
51
69
|
padding-inline-start: 0;
|
|
52
70
|
}
|
|
53
|
-
|
|
54
|
-
@include reset-details;
|
|
55
71
|
}
|
|
@@ -9,13 +9,7 @@ A Dialog allows the user to focus on one task or a piece of information by poppi
|
|
|
9
9
|
- Use dialogs sparingly because they interrupt the user’s workflow.
|
|
10
10
|
- Use a dialog for short and non-frequent tasks.
|
|
11
11
|
Consider using the main flow for regular tasks.
|
|
12
|
-
|
|
13
|
-
## The order of buttons
|
|
14
|
-
|
|
15
|
-
If your Dialog needs more than one button, put the one for the primary action first and the other buttons behind it.
|
|
16
|
-
Sighted users will read the primary action first, in line with the natural reading order.
|
|
17
|
-
The same goes for users of screen readers, who will hear the primary action first, and users of a keyboard, who will focus the primary action first.
|
|
18
|
-
Also, this approach keeps the order of buttons consistent on both narrow and wide screens: if the buttons do not fit next to each other, they get stacked vertically with the primary action on top.
|
|
12
|
+
- Wrap multiple buttons in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-buttons-action-group--docs).
|
|
19
13
|
|
|
20
14
|
## Keyboard support
|
|
21
15
|
|
|
@@ -27,8 +21,7 @@ Also, this approach keeps the order of buttons consistent on both narrow and wid
|
|
|
27
21
|
|
|
28
22
|
## Closing Dialog without submit
|
|
29
23
|
|
|
30
|
-
You can close a Dialog without submitting by using `<button type="button" onClick={
|
|
31
|
-
This uses the `closeDialog` function from the React package.
|
|
24
|
+
You can close a Dialog without submitting by using `<button type="button" onClick={Dialog.close}>`.
|
|
32
25
|
|
|
33
26
|
## References
|
|
34
27
|
|
|
@@ -4,41 +4,32 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@mixin reset-dialog {
|
|
7
|
+
box-sizing: border-box;
|
|
7
8
|
inset-block: 0;
|
|
8
|
-
padding-block: 0;
|
|
9
|
-
padding-inline: 0;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
/* A dialog must have `display: none` until the `open` attribute is set,
|
|
12
|
+
so do not apply these styles without an `open` attribute. */
|
|
13
|
+
.ams-dialog:not(dialog:not([open])) {
|
|
13
14
|
background-color: var(--ams-dialog-background-color);
|
|
14
15
|
border: var(--ams-dialog-border);
|
|
16
|
+
display: flex; // Using flex here, because grid works strangely in Safari
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: var(--ams-dialog-gap);
|
|
15
19
|
inline-size: var(--ams-dialog-inline-size);
|
|
16
20
|
max-block-size: var(--ams-dialog-max-block-size);
|
|
17
21
|
max-inline-size: var(--ams-dialog-max-inline-size);
|
|
22
|
+
padding-block: var(--ams-dialog-padding-block);
|
|
23
|
+
padding-inline: var(--ams-dialog-padding-inline);
|
|
18
24
|
|
|
19
25
|
@include reset-dialog;
|
|
20
26
|
|
|
21
|
-
/*
|
|
27
|
+
/* No token because dialog does not inherit from any element in FireFox and Safari */
|
|
22
28
|
&::backdrop {
|
|
23
29
|
background: #0006;
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
32
|
|
|
27
|
-
.ams-dialog__form {
|
|
28
|
-
display: grid;
|
|
29
|
-
gap: var(--ams-dialog-form-gap);
|
|
30
|
-
padding-block: var(--ams-dialog-form-padding-block);
|
|
31
|
-
padding-inline: var(--ams-dialog-form-padding-inline);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ams-dialog__article {
|
|
35
|
-
display: grid;
|
|
36
|
-
gap: var(--ams-space-md); /* Until we have a consistent way of spacing text elements */
|
|
37
|
-
max-block-size: 100%; /* Safari */
|
|
38
|
-
overflow-y: auto;
|
|
39
|
-
overscroll-behavior-y: contain;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
33
|
.ams-dialog__header {
|
|
43
34
|
align-items: flex-start;
|
|
44
35
|
display: flex;
|
|
@@ -46,15 +37,7 @@
|
|
|
46
37
|
justify-content: space-between;
|
|
47
38
|
}
|
|
48
39
|
|
|
49
|
-
.ams-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
gap: var(--ams-dialog-footer-gap);
|
|
53
|
-
margin-inline-end: auto; // [1]
|
|
54
|
-
|
|
55
|
-
> * {
|
|
56
|
-
flex: auto; // [1]
|
|
57
|
-
}
|
|
40
|
+
.ams-dialog__body {
|
|
41
|
+
overflow-y: auto;
|
|
42
|
+
overscroll-behavior-y: contain;
|
|
58
43
|
}
|
|
59
|
-
|
|
60
|
-
// [1] This combination stacks the buttons vertically and stretches them, until they fit next to each other.
|
|
@@ -6,4 +6,4 @@ Wraps a single input and its related elements. May indicate that the input has a
|
|
|
6
6
|
|
|
7
7
|
## Guidelines
|
|
8
8
|
|
|
9
|
-
Only use Field to wrap a single input. Use [Field Set](/docs/components-forms-field-set--docs) to wrap multiple inputs.
|
|
9
|
+
- Only use Field to wrap a single input. Use [Field Set](/docs/components-forms-field-set--docs) to wrap multiple inputs.
|
|
@@ -7,6 +7,8 @@ A component to group related form inputs.
|
|
|
7
7
|
## Guidelines
|
|
8
8
|
|
|
9
9
|
- Use Field Set when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single Field Set when asking for an address.
|
|
10
|
+
- Set `optional` to `true` if all inputs in a Field Set are not required.
|
|
11
|
+
- Use `hint` to show a custom hint text.
|
|
10
12
|
|
|
11
13
|
## Relevant WCAG requirements
|
|
12
14
|
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
padding-block: var(--ams-file-input-file-selector-button-padding-block);
|
|
49
49
|
padding-inline: var(--ams-file-input-file-selector-button-padding-inline);
|
|
50
50
|
|
|
51
|
+
@include reset-button;
|
|
52
|
+
|
|
51
53
|
@media screen and (-ms-high-contrast: active), screen and (forced-colors: active) {
|
|
52
54
|
border: var(
|
|
53
55
|
--ams-file-input-file-selector-button-forced-color-mode-border
|
|
54
56
|
); // add border because forced colors changes box-shadow to none
|
|
55
57
|
}
|
|
56
|
-
|
|
57
|
-
@include reset-button;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.ams-file-input:disabled::file-selector-button {
|
|
@@ -6,10 +6,10 @@ Provides service information at the bottom of every page.
|
|
|
6
6
|
|
|
7
7
|
## Guidelines
|
|
8
8
|
|
|
9
|
-
The Footer consists of a dark blue [Spotlight](/docs/components-containers-spotlight--docs) and a [Page Menu](/docs/components-navigation-page-menu--docs).
|
|
10
|
-
It must be used on all websites for the City of Amsterdam.
|
|
11
|
-
For applications, only the Page Menu can be sufficient.
|
|
12
|
-
The Footer is the same on every page of the application.
|
|
9
|
+
- The Footer consists of a dark blue [Spotlight](/docs/components-containers-spotlight--docs) and a [Page Menu](/docs/components-navigation-page-menu--docs).
|
|
10
|
+
It must be used on all websites for the City of Amsterdam.
|
|
11
|
+
- For applications, only the Page Menu can be sufficient.
|
|
12
|
+
- The Footer is the same on every page of the application.
|
|
13
13
|
|
|
14
14
|
The Spotlight offers space for various practical links:
|
|
15
15
|
|
|
@@ -8,18 +8,20 @@ Adds white space between a set of elements.
|
|
|
8
8
|
|
|
9
9
|
The five sizes of [Component Space](/docs/brand-design-tokens-space--docs) are available for the width or height of the gap.
|
|
10
10
|
|
|
11
|
-
| Class name |
|
|
11
|
+
| Class name | Example |
|
|
12
12
|
| ------------- | ----------------------------------------------------------------------------------------- |
|
|
13
|
-
| `ams-gap--xs` | <div className="ams-docs-token-
|
|
14
|
-
| `ams-gap--sm` | <div className="ams-docs-token-
|
|
15
|
-
| `ams-gap--md` | <div className="ams-docs-token-
|
|
16
|
-
| `ams-gap--lg` | <div className="ams-docs-token-
|
|
17
|
-
| `ams-gap--xl` | <div className="ams-docs-token-
|
|
13
|
+
| `ams-gap--xs` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-xs);" /> |
|
|
14
|
+
| `ams-gap--sm` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-sm);" /> |
|
|
15
|
+
| `ams-gap--md` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-md);" /> |
|
|
16
|
+
| `ams-gap--lg` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-lg);" /> |
|
|
17
|
+
| `ams-gap--xl` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-xl);" /> |
|
|
18
18
|
|
|
19
19
|
## Guidelines
|
|
20
20
|
|
|
21
21
|
- Use this utility class to vertically separate the children of a parent element from each other.
|
|
22
|
-
-
|
|
22
|
+
- Do not use it on the Grid component.
|
|
23
|
+
Grid is responsible for its own gaps.
|
|
24
|
+
- It can be used on any other element and sets the `gap` CSS property.
|
|
23
25
|
It also makes the element a grid container; the gap would be ignored otherwise.
|
|
24
26
|
These declarations are marked with the `!important` flag to ensure they override any other gaps and display modes.
|
|
25
27
|
- To add a gap between 2 siblings, the first one can be given a [Margin Bottom](/docs/utilities-css-margin--docs) instead.
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
Divides the screen into columns to align the elements of a page.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
Every page should use the grid as the foundation for its layout.
|
|
10
|
-
It is placed directly within the [Screen](/docs/components-layout-screen--docs).
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
A cell often spans multiple columns of the grid.
|
|
7
|
+
## Guidelines
|
|
8
|
+
|
|
9
|
+
- Every page should use the grid as the foundation for its layout.
|
|
10
|
+
It is placed directly within the [Screen](/docs/components-layout-screen--docs).
|
|
11
|
+
- A [Footer](/docs/components-containers-footer--docs) and a [Spotlight](/docs/components-containers-spotlight--docs) are slightly wider than the grid.
|
|
12
|
+
You close one instance of the grid before these components.
|
|
13
|
+
Inside and optionally after them, you start a new one.
|
|
14
|
+
Multiple instances of the grid component are possible on a page, but the columns of all grids must align precisely.
|
|
15
|
+
- Within the grid, you create cells containing the desired content.
|
|
16
|
+
A cell often spans multiple columns of the grid.
|
|
17
|
+
- The Gap utility classes must not be used on the Grid component.
|
|
19
18
|
|
|
20
19
|
## Design
|
|
21
20
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin ams-grid {
|
|
7
|
+
column-gap: var(--ams-grid-column-gap);
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: repeat(var(--ams-grid-column-count), 1fr);
|
|
10
|
+
padding-inline: var(--ams-grid-padding-inline);
|
|
11
|
+
row-gap: var(--ams-grid-row-gap-md);
|
|
12
|
+
|
|
13
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
14
|
+
grid-template-columns: repeat(var(--ams-grid-medium-column-count), 1fr);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
18
|
+
grid-template-columns: repeat(var(--ams-grid-wide-column-count), 1fr);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Grid gap
|
|
23
|
+
|
|
24
|
+
@mixin ams-grid--gap-vertical--none {
|
|
25
|
+
row-gap: initial;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin ams-grid--gap-vertical--small {
|
|
29
|
+
row-gap: var(--ams-grid-row-gap-sm);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin ams-grid--gap-vertical--large {
|
|
33
|
+
row-gap: var(--ams-grid-row-gap-lg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Grid padding
|
|
37
|
+
|
|
38
|
+
@mixin ams-grid--padding-bottom--small {
|
|
39
|
+
padding-block-end: var(--ams-grid-padding-block-sm);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@mixin ams-grid--padding-bottom--medium {
|
|
43
|
+
padding-block-end: var(--ams-grid-padding-block-md);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin ams-grid--padding-bottom--large {
|
|
47
|
+
padding-block-end: var(--ams-grid-padding-block-lg);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin ams-grid--padding-top--small {
|
|
51
|
+
padding-block-start: var(--ams-grid-padding-block-sm);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@mixin ams-grid--padding-top--medium {
|
|
55
|
+
padding-block-start: var(--ams-grid-padding-block-md);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@mixin ams-grid--padding-top--large {
|
|
59
|
+
padding-block-start: var(--ams-grid-padding-block-lg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin ams-grid--padding-vertical--small {
|
|
63
|
+
padding-block: var(--ams-grid-padding-block-sm);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@mixin ams-grid--padding-vertical--medium {
|
|
67
|
+
padding-block: var(--ams-grid-padding-block-md);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@mixin ams-grid--padding-vertical--large {
|
|
71
|
+
padding-block: var(--ams-grid-padding-block-lg);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@mixin ams-grid__cell--span-all {
|
|
75
|
+
grid-column: 1 / -1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Column span
|
|
79
|
+
|
|
80
|
+
@mixin ams-grid__cell--span($i) {
|
|
81
|
+
grid-column-end: span $i;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@mixin ams-grid__cell--start($i) {
|
|
85
|
+
grid-column-start: $i;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@mixin ams-grid__cell--span-medium($i) {
|
|
89
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
90
|
+
grid-column-end: span $i;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@mixin ams-grid__cell--start-medium($i) {
|
|
95
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
96
|
+
grid-column-start: $i;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@mixin ams-grid__cell--span-wide($i) {
|
|
101
|
+
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
102
|
+
grid-column-end: span $i;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@mixin ams-grid__cell--start-wide($i) {
|
|
107
|
+
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
108
|
+
grid-column-start: $i;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -4,107 +4,103 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/breakpoint";
|
|
7
|
+
@import "mixins";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
column-gap: var(--ams-grid-column-gap);
|
|
10
|
-
display: grid;
|
|
11
|
-
grid-template-columns: repeat(var(--ams-grid-column-count), 1fr);
|
|
12
|
-
padding-inline: var(--ams-grid-padding-inline);
|
|
13
|
-
row-gap: var(--ams-grid-row-gap-md);
|
|
14
|
-
|
|
15
|
-
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
16
|
-
grid-template-columns: repeat(var(--ams-grid-medium-column-count), 1fr);
|
|
17
|
-
}
|
|
9
|
+
$ams-grid-column-count: 12;
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
11
|
+
.ams-grid {
|
|
12
|
+
@include ams-grid;
|
|
22
13
|
}
|
|
23
14
|
|
|
15
|
+
// Grid gap
|
|
16
|
+
|
|
24
17
|
.ams-grid--gap-vertical--none {
|
|
25
|
-
|
|
18
|
+
@include ams-grid--gap-vertical--none;
|
|
26
19
|
}
|
|
27
20
|
|
|
28
21
|
.ams-grid--gap-vertical--small {
|
|
29
|
-
|
|
22
|
+
@include ams-grid--gap-vertical--small;
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
.ams-grid--gap-vertical--large {
|
|
33
|
-
|
|
26
|
+
@include ams-grid--gap-vertical--large;
|
|
34
27
|
}
|
|
35
28
|
|
|
29
|
+
// Grid padding
|
|
30
|
+
|
|
36
31
|
.ams-grid--padding-bottom--small {
|
|
37
|
-
|
|
32
|
+
@include ams-grid--padding-bottom--small;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
.ams-grid--padding-bottom--medium {
|
|
41
|
-
|
|
36
|
+
@include ams-grid--padding-bottom--medium;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
.ams-grid--padding-bottom--large {
|
|
45
|
-
|
|
40
|
+
@include ams-grid--padding-bottom--large;
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
.ams-grid--padding-top--small {
|
|
49
|
-
|
|
44
|
+
@include ams-grid--padding-top--small;
|
|
50
45
|
}
|
|
51
46
|
|
|
52
47
|
.ams-grid--padding-top--medium {
|
|
53
|
-
|
|
48
|
+
@include ams-grid--padding-top--medium;
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
.ams-grid--padding-top--large {
|
|
57
|
-
|
|
52
|
+
@include ams-grid--padding-top--large;
|
|
58
53
|
}
|
|
59
54
|
|
|
60
55
|
.ams-grid--padding-vertical--small {
|
|
61
|
-
|
|
56
|
+
@include ams-grid--padding-vertical--small;
|
|
62
57
|
}
|
|
63
58
|
|
|
64
59
|
.ams-grid--padding-vertical--medium {
|
|
65
|
-
|
|
60
|
+
@include ams-grid--padding-vertical--medium;
|
|
66
61
|
}
|
|
67
62
|
|
|
68
63
|
.ams-grid--padding-vertical--large {
|
|
69
|
-
|
|
64
|
+
@include ams-grid--padding-vertical--large;
|
|
70
65
|
}
|
|
71
66
|
|
|
67
|
+
// Column span
|
|
68
|
+
// The order of these declaration blocks ensures the intended specificity.
|
|
69
|
+
|
|
72
70
|
.ams-grid__cell--span-all {
|
|
73
|
-
|
|
71
|
+
@include ams-grid__cell--span-all;
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@for $i from 1 through 12 {
|
|
74
|
+
@for $i from 1 through $ams-grid-column-count {
|
|
79
75
|
.ams-grid__cell--span-#{$i} {
|
|
80
|
-
|
|
76
|
+
@include ams-grid__cell--span($i);
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
.ams-grid__cell--start-#{$i} {
|
|
84
|
-
|
|
80
|
+
@include ams-grid__cell--start($i);
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
|
|
88
84
|
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
89
|
-
@for $i from 1 through
|
|
85
|
+
@for $i from 1 through $ams-grid-column-count {
|
|
90
86
|
.ams-grid__cell--span-#{$i}-medium {
|
|
91
|
-
|
|
87
|
+
@include ams-grid__cell--span-medium($i);
|
|
92
88
|
}
|
|
93
89
|
|
|
94
90
|
.ams-grid__cell--start-#{$i}-medium {
|
|
95
|
-
|
|
91
|
+
@include ams-grid__cell--start-medium($i);
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
101
|
-
@for $i from 1 through
|
|
97
|
+
@for $i from 1 through $ams-grid-column-count {
|
|
102
98
|
.ams-grid__cell--span-#{$i}-wide {
|
|
103
|
-
|
|
99
|
+
@include ams-grid__cell--span-wide($i);
|
|
104
100
|
}
|
|
105
101
|
|
|
106
102
|
.ams-grid__cell--start-#{$i}-wide {
|
|
107
|
-
|
|
103
|
+
@include ams-grid__cell--start-wide($i);
|
|
108
104
|
}
|
|
109
105
|
}
|
|
110
106
|
}
|
|
@@ -7,17 +7,15 @@ Includes the name of the application if it is not the general website.
|
|
|
7
7
|
|
|
8
8
|
## Guidelines
|
|
9
9
|
|
|
10
|
-
The Header must be used on all websites and applications for the City of Amsterdam.
|
|
11
|
-
It includes the logo of the City or the organization, the site title (except for the general website), and a menu with links to commonly used pages.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Labels should be short to ensure the menu fits on one line, even on medium-wide screens.
|
|
20
|
-
An icon can be added to the end of a link to make its function easier to find.
|
|
10
|
+
- The Header must be used on all websites and applications for the City of Amsterdam.
|
|
11
|
+
- It includes the logo of the City or the organization, the site title (except for the general website), and a menu with links to commonly used pages.
|
|
12
|
+
- The Header is important because it conveys our corporate identity and is the first thing people see.
|
|
13
|
+
Using it consistently helps users recognize and trust the website.
|
|
14
|
+
- It is the same on every page of the application.
|
|
15
|
+
- The page menu can contain a maximum of 5 items.
|
|
16
|
+
The last two will often be ‘Search’ and ‘Menu’.
|
|
17
|
+
- Labels should be short to ensure the menu fits on one line, even on medium-wide screens.
|
|
18
|
+
- An icon can be added to the end of a link to make its function easier to find.
|
|
21
19
|
|
|
22
20
|
## References
|
|
23
21
|
|
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
@mixin reset {
|
|
7
7
|
border: 0;
|
|
8
|
+
margin-block: 0; // [1]
|
|
9
|
+
margin-inline: 0; // [1]
|
|
8
10
|
padding-block: 0;
|
|
9
11
|
padding-inline: 0;
|
|
12
|
+
|
|
13
|
+
// [1] Remove the margin in older Safari.
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
.ams-icon-button {
|
|
@@ -16,6 +20,8 @@
|
|
|
16
20
|
outline-offset: var(--ams-icon-button-outline-offset);
|
|
17
21
|
touch-action: manipulation;
|
|
18
22
|
|
|
23
|
+
@include reset;
|
|
24
|
+
|
|
19
25
|
&:hover {
|
|
20
26
|
background-color: var(--ams-icon-button-hover-background-color);
|
|
21
27
|
color: var(--ams-icon-button-hover-color);
|
|
@@ -26,35 +32,33 @@
|
|
|
26
32
|
color: var(--ams-icon-button-disabled-color);
|
|
27
33
|
cursor: not-allowed;
|
|
28
34
|
}
|
|
29
|
-
|
|
30
|
-
@include reset;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
|
-
.ams-icon-button--
|
|
34
|
-
color: var(--ams-icon-button-
|
|
37
|
+
.ams-icon-button--contrast-color {
|
|
38
|
+
color: var(--ams-icon-button-contrast-color-color);
|
|
35
39
|
|
|
36
40
|
&:hover {
|
|
37
|
-
background-color: var(--ams-icon-button-
|
|
38
|
-
color: var(--ams-icon-button-
|
|
41
|
+
background-color: var(--ams-icon-button-contrast-color-hover-background-color);
|
|
42
|
+
color: var(--ams-icon-button-contrast-color-hover-color);
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
&:disabled {
|
|
42
46
|
background-color: transparent;
|
|
43
|
-
color: var(--ams-icon-button-
|
|
47
|
+
color: var(--ams-icon-button-contrast-color-disabled-color);
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
.ams-icon-button--
|
|
48
|
-
background-color: var(--ams-icon-button-
|
|
49
|
-
color: var(--ams-icon-button-
|
|
51
|
+
.ams-icon-button--inverse-color {
|
|
52
|
+
background-color: var(--ams-icon-button-inverse-color-background-color);
|
|
53
|
+
color: var(--ams-icon-button-inverse-color-color);
|
|
50
54
|
|
|
51
55
|
&:hover {
|
|
52
|
-
background-color: var(--ams-icon-button-
|
|
53
|
-
color: var(--ams-icon-button-
|
|
56
|
+
background-color: var(--ams-icon-button-inverse-color-hover-background-color);
|
|
57
|
+
color: var(--ams-icon-button-inverse-color-hover-color);
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
&:disabled {
|
|
57
|
-
background-color: var(--ams-icon-button-
|
|
58
|
-
color: var(--ams-icon-button-
|
|
61
|
+
background-color: var(--ams-icon-button-inverse-color-disabled-background-color);
|
|
62
|
+
color: var(--ams-icon-button-inverse-color-disabled-color);
|
|
59
63
|
}
|
|
60
64
|
}
|