@amsterdam/design-system-css 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/avatar/avatar.css +1 -1
- package/dist/avatar/avatar.css.map +1 -1
- package/dist/badge/badge.css +1 -1
- package/dist/badge/badge.css.map +1 -1
- package/dist/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.css.map +1 -1
- package/dist/button/button.css +1 -1
- package/dist/button/button.css.map +1 -1
- package/dist/card/card.css +1 -1
- package/dist/card/card.css.map +1 -1
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/date-input/date-input.css +1 -1
- package/dist/date-input/date-input.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/error-message/error-message.css +1 -0
- package/dist/error-message/error-message.css.map +1 -0
- package/dist/field/field.css +1 -0
- package/dist/field/field.css.map +1 -0
- package/dist/field-set/field-set.css +1 -0
- package/dist/field-set/field-set.css.map +1 -0
- package/dist/file-input/file-input.css +1 -0
- package/dist/file-input/file-input.css.map +1 -0
- package/dist/header/header.css +1 -1
- package/dist/header/header.css.map +1 -1
- package/dist/icon/icon.css +1 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/image/image.css +1 -1
- package/dist/image/image.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/link-list/link-list.css +1 -1
- package/dist/link-list/link-list.css.map +1 -1
- package/dist/logo/logo.css +1 -1
- package/dist/logo/logo.css.map +1 -1
- package/dist/ordered-list/ordered-list.css +1 -1
- package/dist/ordered-list/ordered-list.css.map +1 -1
- package/dist/pagination/pagination.css +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/paragraph/paragraph.css +1 -1
- package/dist/paragraph/paragraph.css.map +1 -1
- package/dist/radio/radio.css +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/screen/screen.css +1 -1
- package/dist/screen/screen.css.map +1 -1
- package/dist/search-field/search-field.css +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/select/select.css +1 -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/table/table.css +1 -1
- package/dist/table/table.css.map +1 -1
- package/dist/tabs/tabs.css +1 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/text-area/text-area.css +1 -1
- package/dist/text-area/text-area.css.map +1 -1
- package/dist/text-input/text-input.css +1 -1
- package/dist/text-input/text-input.css.map +1 -1
- package/dist/time-input/time-input.css +1 -1
- package/dist/time-input/time-input.css.map +1 -1
- package/dist/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/dist/visually-hidden/visually-hidden.css +1 -1
- package/dist/visually-hidden/visually-hidden.css.map +1 -1
- package/documentation/coding-conventions.md +10 -4
- package/package.json +6 -3
- package/src/common/hide-input.scss +1 -1
- package/src/components/accordion/accordion.scss +1 -1
- package/src/components/avatar/avatar.scss +2 -2
- package/src/components/badge/badge.scss +35 -5
- package/src/components/breadcrumb/breadcrumb.scss +9 -9
- package/src/components/button/button.scss +1 -0
- package/src/components/card/card.scss +1 -1
- package/src/components/checkbox/checkbox.scss +4 -4
- package/src/components/date-input/date-input.scss +6 -7
- package/src/components/dialog/README.md +7 -0
- package/src/components/dialog/dialog.scss +7 -7
- package/src/components/error-message/README.md +11 -0
- package/src/components/error-message/error-message.scss +22 -0
- package/src/components/field/README.md +9 -0
- package/src/components/field/field.scss +16 -0
- package/src/components/field-set/README.md +17 -0
- package/src/components/field-set/field-set.scss +48 -0
- package/src/components/file-input/README.md +9 -0
- package/src/components/file-input/file-input.scss +69 -0
- package/src/components/header/header.scss +5 -5
- package/src/components/icon/icon.scss +12 -12
- package/src/components/image/image.scss +3 -3
- package/src/components/index.scss +4 -1
- package/src/components/link-list/link-list.scss +2 -2
- package/src/components/logo/logo.scss +1 -1
- package/src/components/ordered-list/ordered-list.scss +5 -0
- package/src/components/pagination/README.md +1 -0
- package/src/components/pagination/pagination.scss +2 -2
- package/src/components/paragraph/paragraph.scss +2 -2
- package/src/components/radio/radio.scss +4 -4
- package/src/components/screen/screen.scss +3 -3
- package/src/components/search-field/search-field.scss +16 -6
- package/src/components/select/select.scss +8 -6
- package/src/components/switch/switch.scss +12 -9
- package/src/components/table/table.scss +1 -1
- package/src/components/tabs/tabs.scss +1 -1
- package/src/components/text-area/text-area.scss +9 -5
- package/src/components/text-input/text-input.scss +6 -2
- package/src/components/time-input/time-input.scss +7 -8
- package/src/components/unordered-list/unordered-list.scss +5 -0
- package/src/components/visually-hidden/visually-hidden.scss +2 -2
- package/dist/fieldset/fieldset.css +0 -1
- package/dist/fieldset/fieldset.css.map +0 -1
- package/src/components/fieldset/README.md +0 -18
- package/src/components/fieldset/fieldset.scss +0 -35
|
@@ -18,37 +18,37 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.ams-icon--size-3 {
|
|
21
|
-
|
|
21
|
+
block-size: calc(var(--ams-icon-size-3-font-size) * var(--ams-icon-size-3-line-height));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.ams-icon--size-3 svg {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
block-size: var(--ams-icon-size-3-font-size);
|
|
26
|
+
inline-size: var(--ams-icon-size-3-font-size);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.ams-icon--size-4 {
|
|
30
|
-
|
|
30
|
+
block-size: calc(var(--ams-icon-size-4-font-size) * var(--ams-icon-size-4-line-height));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.ams-icon--size-4 svg {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
block-size: var(--ams-icon-size-4-font-size);
|
|
35
|
+
inline-size: var(--ams-icon-size-4-font-size);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.ams-icon--size-5 {
|
|
39
|
-
|
|
39
|
+
block-size: calc(var(--ams-icon-size-5-font-size) * var(--ams-icon-size-5-line-height));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.ams-icon--size-5 svg {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
block-size: var(--ams-icon-size-5-font-size);
|
|
44
|
+
inline-size: var(--ams-icon-size-5-font-size);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.ams-icon--size-6 {
|
|
48
|
-
|
|
48
|
+
block-size: calc(var(--ams-icon-size-6-font-size) * var(--ams-icon-size-6-line-height));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ams-icon--size-6 svg {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
block-size: var(--ams-icon-size-6-font-size);
|
|
53
|
+
inline-size: var(--ams-icon-size-6-font-size);
|
|
54
54
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
.ams-image {
|
|
7
|
+
block-size: auto; /* [1] */
|
|
7
8
|
font-style: italic; /* [3] */
|
|
8
|
-
|
|
9
|
-
max-width: 100%; /* [1] */
|
|
9
|
+
max-inline-size: 100%; /* [1] */
|
|
10
10
|
vertical-align: middle; /* [2] */
|
|
11
11
|
|
|
12
12
|
&--cover {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// [1] Allow for fluid image sizing while maintaining aspect ratio governed by
|
|
17
|
+
// [1] Allow for fluid image sizing while maintaining aspect ratio governed by inline/block size attributes
|
|
18
18
|
// [2] Remove ‘phantom’ white space
|
|
19
19
|
// [3] Italicise alt text to visually offset it from surrounding copy
|
|
20
20
|
// Source: https://x.com/csswizardry/status/1717841334462005661
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* Append here */
|
|
7
|
+
@import "./error-message/error-message";
|
|
8
|
+
@import "./file-input/file-input";
|
|
9
|
+
@import "./field/field";
|
|
7
10
|
@import "./select/select";
|
|
8
11
|
@import "./time-input/time-input";
|
|
9
12
|
@import "./date-input/date-input";
|
|
@@ -18,7 +21,7 @@
|
|
|
18
21
|
@import "./column/column";
|
|
19
22
|
@import "./margin/margin";
|
|
20
23
|
@import "./gap/gap";
|
|
21
|
-
@import "./
|
|
24
|
+
@import "./field-set/field-set";
|
|
22
25
|
@import "./link-list/link-list";
|
|
23
26
|
@import "./badge/badge";
|
|
24
27
|
@import "./table/table";
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
color: var(--ams-link-list-link-color);
|
|
27
27
|
display: inline-flex;
|
|
28
28
|
font-family: var(--ams-link-list-link-font-family);
|
|
29
|
-
font-size: var(--ams-link-list-link-
|
|
29
|
+
font-size: var(--ams-link-list-link-font-size);
|
|
30
30
|
font-weight: var(--ams-link-list-link-font-weight);
|
|
31
31
|
gap: var(--ams-link-list-link-gap);
|
|
32
|
-
line-height: var(--ams-link-list-link-
|
|
32
|
+
line-height: var(--ams-link-list-link-line-height);
|
|
33
33
|
outline-offset: var(--ams-link-list-link-outline-offset);
|
|
34
34
|
text-decoration-line: var(--ams-link-list-link-text-decoration-line);
|
|
35
35
|
text-decoration-thickness: var(--ams-link-list-link-text-decoration-thickness);
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
color: var(--ams-ordered-list-inverse-color);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.ams-ordered-list--small:not(.ams-ordered-list--no-markers) {
|
|
46
|
+
font-size: var(--ams-ordered-list-small-font-size);
|
|
47
|
+
line-height: var(--ams-ordered-list-small-line-height);
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
/** A nested list has a different marker and less indentation for correct alignment. */
|
|
46
51
|
:is(.ams-ordered-list, .ams-unordered-list) .ams-ordered-list {
|
|
47
52
|
list-style-type: var(--ams-ordered-list-ordered-list-list-style-type);
|
|
@@ -15,6 +15,7 @@ Pagination indicates the current page and allows users to navigate to other page
|
|
|
15
15
|
- Redirect users to the first page if they enter a URL with a page number that doesn’t exist.
|
|
16
16
|
- Pagination can be combined with a counter at the top of the page indicating “Page # of ##.”
|
|
17
17
|
- Start a page with an overview list at the top after changing the page.
|
|
18
|
+
- Make sure that the visible and accessible labels for the ‘previous’ and ‘next’ buttons convey the same meaning at all times – e.g. don’t update one and forget the other.
|
|
18
19
|
|
|
19
20
|
## Relevant WCAG Rules
|
|
20
21
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
.ams-paragraph {
|
|
14
14
|
color: var(--ams-paragraph-color);
|
|
15
15
|
font-family: var(--ams-paragraph-font-family);
|
|
16
|
-
font-size: var(--ams-paragraph-
|
|
16
|
+
font-size: var(--ams-paragraph-font-size);
|
|
17
17
|
font-weight: var(--ams-paragraph-font-weight);
|
|
18
|
-
line-height: var(--ams-paragraph-
|
|
18
|
+
line-height: var(--ams-paragraph-line-height);
|
|
19
19
|
|
|
20
20
|
@include text-rendering;
|
|
21
21
|
@include reset;
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
|
|
15
15
|
.ams-radio__circle {
|
|
16
16
|
align-items: center;
|
|
17
|
+
block-size: calc(var(--ams-radio-font-size) * var(--ams-radio-line-height));
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-shrink: 0;
|
|
19
|
-
|
|
20
|
-
width: 1.5rem;
|
|
20
|
+
inline-size: 1.5rem;
|
|
21
21
|
|
|
22
22
|
&::after {
|
|
23
23
|
background-position: center;
|
|
24
24
|
background-repeat: no-repeat;
|
|
25
25
|
background-size: 1rem;
|
|
26
|
+
block-size: 1.5rem;
|
|
26
27
|
border-color: var(--ams-radio-circle-border-color);
|
|
27
28
|
border-radius: 100%;
|
|
28
29
|
border-style: solid;
|
|
29
30
|
border-width: var(--ams-radio-circle-border-width);
|
|
30
31
|
box-sizing: border-box;
|
|
31
32
|
content: "";
|
|
32
|
-
|
|
33
|
-
width: 100%;
|
|
33
|
+
inline-size: 100%;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ams-screen--full-height {
|
|
18
|
-
min-
|
|
18
|
+
min-block-size: 100vh;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.ams-screen--wide {
|
|
22
|
-
max-
|
|
22
|
+
max-inline-size: var(--ams-screen-wide-max-inline-size);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.ams-screen--x-wide {
|
|
26
|
-
max-
|
|
26
|
+
max-inline-size: var(--ams-screen-x-wide-max-inline-size);
|
|
27
27
|
}
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@mixin reset-input {
|
|
14
|
-
// Reset
|
|
15
|
-
|
|
16
|
-
appearance: none;
|
|
14
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
15
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
17
16
|
border: 0;
|
|
18
17
|
border-radius: 0; // Reset rounded borders on iOS devices
|
|
19
18
|
box-sizing: border-box;
|
|
@@ -27,12 +26,12 @@
|
|
|
27
26
|
font-family: var(--ams-search-field-input-font-family);
|
|
28
27
|
font-size: var(--ams-search-field-input-font-size);
|
|
29
28
|
font-weight: var(--ams-search-field-input-font-weight);
|
|
29
|
+
inline-size: 100%;
|
|
30
30
|
line-height: var(--ams-search-field-input-line-height);
|
|
31
31
|
outline-offset: var(--ams-search-field-input-outline-offset);
|
|
32
32
|
padding-block: var(--ams-search-field-input-padding-block);
|
|
33
33
|
padding-inline: var(--ams-search-field-input-padding-inline);
|
|
34
34
|
touch-action: manipulation;
|
|
35
|
-
width: 100%;
|
|
36
35
|
|
|
37
36
|
@include text-rendering;
|
|
38
37
|
@include reset-input;
|
|
@@ -46,17 +45,28 @@
|
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|
|
48
|
+
.ams-search-field__input:invalid,
|
|
49
|
+
.ams-search-field__input[aria-invalid="true"] {
|
|
50
|
+
box-shadow: var(--ams-search-field-input-invalid-box-shadow);
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
// TODO: this should be the (currently non-existent) dark red hover color
|
|
54
|
+
box-shadow: var(--ams-search-field-input-invalid-hover-box-shadow);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
.ams-search-field__input::placeholder {
|
|
50
59
|
color: var(--ams-search-field-input-placeholder-color);
|
|
60
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
51
61
|
}
|
|
52
62
|
|
|
53
63
|
.ams-search-field__input::-webkit-search-cancel-button {
|
|
54
64
|
appearance: none;
|
|
55
65
|
background-image: var(--ams-search-field-input-cancel-button-background-image);
|
|
66
|
+
block-size: var(--ams-search-field-input-cancel-button-block-size);
|
|
56
67
|
cursor: pointer;
|
|
57
|
-
|
|
68
|
+
inline-size: var(--ams-search-field-input-cancel-button-inline-size);
|
|
58
69
|
margin-inline-start: 0.5rem;
|
|
59
|
-
width: var(--ams-search-field-input-cancel-button-width);
|
|
60
70
|
}
|
|
61
71
|
|
|
62
72
|
@mixin reset-button {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@mixin reset {
|
|
7
|
-
appearance: none;
|
|
7
|
+
appearance: none; // Reset native appearance to hide default chevron
|
|
8
8
|
border: 0;
|
|
9
9
|
border-radius: 0; // Reset rounded borders for Safari on MacOS
|
|
10
10
|
}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
font-family: var(--ams-select-font-family);
|
|
17
17
|
font-size: var(--ams-select-font-size);
|
|
18
18
|
font-weight: var(--ams-select-font-weight);
|
|
19
|
+
inline-size: 100%;
|
|
19
20
|
line-height: var(--ams-select-line-height);
|
|
20
|
-
max-inline-size: 100%;
|
|
21
21
|
outline-offset: var(--ams-select-outline-offset);
|
|
22
22
|
padding-block: var(--ams-select-padding-block);
|
|
23
23
|
padding-inline: var(--ams-select-padding-inline);
|
|
@@ -37,12 +37,9 @@
|
|
|
37
37
|
@include reset;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.ams-select:invalid,
|
|
40
41
|
.ams-select[aria-invalid="true"] {
|
|
41
42
|
box-shadow: var(--ams-select-invalid-box-shadow);
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
box-shadow: var(--ams-select-invalid-hover-box-shadow);
|
|
45
|
-
}
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
.ams-select:disabled {
|
|
@@ -55,6 +52,11 @@
|
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
54
|
|
|
55
|
+
.ams-select:invalid:hover,
|
|
56
|
+
.ams-select[aria-invalid="true"]:hover {
|
|
57
|
+
box-shadow: var(--ams-select-invalid-hover-box-shadow);
|
|
58
|
+
}
|
|
59
|
+
|
|
58
60
|
.ams-select__option:disabled {
|
|
59
61
|
color: var(--ams-select-option-disabled-color);
|
|
60
62
|
}
|
|
@@ -16,29 +16,31 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.ams-switch__label {
|
|
19
|
+
--ams-switch-track-padding: 0.0625rem;
|
|
20
|
+
|
|
19
21
|
background-color: var(--ams-switch-background-color);
|
|
20
|
-
border-radius: calc(var(--ams-switch-thumb-
|
|
22
|
+
border-radius: calc(var(--ams-switch-thumb-inline-size) * 2);
|
|
21
23
|
cursor: pointer;
|
|
22
24
|
display: inline-block;
|
|
25
|
+
inline-size: var(--ams-switch-inline-size);
|
|
23
26
|
outline-offset: var(--ams-switch-outline-offset);
|
|
24
|
-
padding-block:
|
|
25
|
-
padding-inline:
|
|
27
|
+
padding-block: var(--ams-switch-track-padding);
|
|
28
|
+
padding-inline: var(--ams-switch-track-padding);
|
|
26
29
|
transition: background-color 0.2s ease-in-out;
|
|
27
|
-
width: var(--ams-switch-width);
|
|
28
30
|
|
|
29
31
|
@include reset;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.ams-switch__label::before {
|
|
33
35
|
background-color: var(--ams-switch-thumb-background-color);
|
|
36
|
+
block-size: var(--ams-switch-thumb-block-size);
|
|
34
37
|
border-radius: 50%;
|
|
35
38
|
content: "";
|
|
36
39
|
display: block;
|
|
37
|
-
|
|
40
|
+
inline-size: var(--ams-switch-thumb-inline-size);
|
|
38
41
|
transition-duration: 0.1s;
|
|
39
42
|
transition-property: box-shadow, transform;
|
|
40
43
|
transition-timing-function: ease-in-out;
|
|
41
|
-
width: var(--ams-switch-thumb-width);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
.ams-switch__input:checked + .ams-switch__label {
|
|
@@ -51,10 +53,11 @@
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.ams-switch__input:checked + .ams-switch__label::before {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
transform: translate(
|
|
57
|
+
calc(var(--ams-switch-inline-size) - var(--ams-switch-thumb-inline-size) - 2 * var(--ams-switch-track-padding))
|
|
58
|
+
);
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
.ams-switch:hover .ams-switch__input:enabled + .ams-switch__label::before {
|
|
59
|
-
box-shadow:
|
|
62
|
+
box-shadow: var(--ams-switch-thumb-hover-box-shadow);
|
|
60
63
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
.ams-table__cell,
|
|
26
26
|
.ams-table__header-cell {
|
|
27
|
-
border-
|
|
27
|
+
border-block-end: var(--ams-table-cell-border-block-end);
|
|
28
28
|
padding-block: var(--ams-table-cell-padding-block);
|
|
29
29
|
padding-inline: var(--ams-table-cell-padding-inline);
|
|
30
30
|
text-align: start;
|
|
@@ -6,26 +6,29 @@
|
|
|
6
6
|
@import "../../common/text-rendering";
|
|
7
7
|
|
|
8
8
|
@mixin reset {
|
|
9
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
10
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
11
|
+
border: 0;
|
|
12
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
9
13
|
box-sizing: border-box;
|
|
10
14
|
margin-block: 0;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
.ams-text-area {
|
|
14
18
|
background-color: var(--ams-text-area-background-color);
|
|
15
|
-
border: 0;
|
|
16
19
|
box-shadow: var(--ams-text-area-box-shadow);
|
|
17
20
|
color: var(--ams-text-area-color);
|
|
18
21
|
font-family: var(--ams-text-area-font-family);
|
|
19
22
|
font-size: var(--ams-text-area-font-size);
|
|
20
23
|
font-weight: var(--ams-text-area-font-weight);
|
|
24
|
+
inline-size: 100%;
|
|
21
25
|
line-height: var(--ams-text-area-line-height);
|
|
22
|
-
max-
|
|
23
|
-
min-
|
|
26
|
+
max-inline-size: 100%; // This prevents overflow when using the `cols` prop
|
|
27
|
+
min-block-size: var(--ams-text-area-min-block-size);
|
|
24
28
|
outline-offset: var(--ams-text-area-outline-offset);
|
|
25
29
|
padding-block: var(--ams-text-area-padding-block);
|
|
26
30
|
padding-inline: var(--ams-text-area-padding-inline);
|
|
27
31
|
touch-action: manipulation;
|
|
28
|
-
width: 100%;
|
|
29
32
|
|
|
30
33
|
@include text-rendering;
|
|
31
34
|
@include reset;
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
|
|
38
41
|
.ams-text-area::placeholder {
|
|
39
42
|
color: var(--ams-text-area-placeholder-color);
|
|
43
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
.ams-text-area:disabled {
|
|
@@ -69,5 +73,5 @@
|
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
.ams-text-area--cols {
|
|
72
|
-
|
|
76
|
+
inline-size: auto;
|
|
73
77
|
}
|
|
@@ -6,24 +6,27 @@
|
|
|
6
6
|
@import "../../common/text-rendering";
|
|
7
7
|
|
|
8
8
|
@mixin reset {
|
|
9
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
10
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
11
|
+
border: 0;
|
|
12
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
9
13
|
box-sizing: border-box;
|
|
10
14
|
margin-block: 0;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
.ams-text-input {
|
|
14
18
|
background-color: var(--ams-text-input-background-color);
|
|
15
|
-
border: 0;
|
|
16
19
|
box-shadow: var(--ams-text-input-box-shadow);
|
|
17
20
|
color: var(--ams-text-input-color);
|
|
18
21
|
font-family: var(--ams-text-input-font-family);
|
|
19
22
|
font-size: var(--ams-text-input-font-size);
|
|
20
23
|
font-weight: var(--ams-text-input-font-weight);
|
|
24
|
+
inline-size: 100%;
|
|
21
25
|
line-height: var(--ams-text-input-line-height);
|
|
22
26
|
outline-offset: var(--ams-text-input-outline-offset);
|
|
23
27
|
padding-block: var(--ams-text-input-padding-block);
|
|
24
28
|
padding-inline: var(--ams-text-input-padding-inline);
|
|
25
29
|
touch-action: manipulation;
|
|
26
|
-
width: 100%;
|
|
27
30
|
|
|
28
31
|
@include text-rendering;
|
|
29
32
|
@include reset;
|
|
@@ -35,6 +38,7 @@
|
|
|
35
38
|
|
|
36
39
|
.ams-text-input::placeholder {
|
|
37
40
|
color: var(--ams-text-input-placeholder-color);
|
|
41
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
.ams-text-input:disabled {
|
|
@@ -6,14 +6,13 @@
|
|
|
6
6
|
@import "../../common/text-rendering";
|
|
7
7
|
|
|
8
8
|
@mixin reset {
|
|
9
|
-
// Reset
|
|
10
|
-
|
|
11
|
-
appearance: none;
|
|
9
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
10
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
12
11
|
border: 0;
|
|
13
12
|
border-radius: 0; // Reset rounded borders on iOS devices
|
|
14
13
|
box-sizing: border-box;
|
|
14
|
+
inline-size: auto; // Reset inline size of 10em set by Android devices
|
|
15
15
|
margin-block: 0;
|
|
16
|
-
width: auto; // Reset width of 10em set by Android devices
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
.ams-time-input {
|
|
@@ -25,13 +24,13 @@
|
|
|
25
24
|
font-weight: var(--ams-time-input-font-weight);
|
|
26
25
|
line-height: var(--ams-time-input-line-height);
|
|
27
26
|
|
|
28
|
-
// Set min
|
|
29
|
-
min-
|
|
27
|
+
// Set min block size for iOS, otherwise an empty box is a lot smaller than a filled one.
|
|
28
|
+
min-block-size: calc(
|
|
30
29
|
(var(--ams-time-input-font-size) * var(--ams-time-input-line-height)) + 2 * var(--ams-time-input-padding-block)
|
|
31
30
|
);
|
|
32
31
|
|
|
33
|
-
// Set min
|
|
34
|
-
min-
|
|
32
|
+
// Set min inline size for iOS, so the size is closer to the filled in size.
|
|
33
|
+
min-inline-size: calc(4ch + (2 * var(--ams-time-input-padding-inline)));
|
|
35
34
|
outline-offset: var(--ams-time-input-outline-offset);
|
|
36
35
|
padding-block: var(--ams-time-input-padding-block);
|
|
37
36
|
padding-inline: var(--ams-time-input-padding-inline);
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
color: var(--ams-unordered-list-inverse-color);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.ams-unordered-list--small:not(.ams-unordered-list--no-markers) {
|
|
46
|
+
font-size: var(--ams-unordered-list-small-font-size);
|
|
47
|
+
line-height: var(--ams-unordered-list-small-line-height);
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
/** A nested list has a different marker and less indentation for correct alignment. */
|
|
46
51
|
:is(.ams-ordered-list, .ams-unordered-list) .ams-unordered-list {
|
|
47
52
|
list-style-type: var(--ams-unordered-list-unordered-list-list-style-type);
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
// Source: https://css-tricks.com/inclusively-hidden/
|
|
7
7
|
.ams-visually-hidden:not(:active, :focus) {
|
|
8
|
+
block-size: 1px;
|
|
8
9
|
clip: rect(0 0 0 0);
|
|
9
10
|
clip-path: inset(50%);
|
|
10
|
-
|
|
11
|
+
inline-size: 1px;
|
|
11
12
|
overflow: hidden;
|
|
12
13
|
position: absolute;
|
|
13
14
|
white-space: nowrap;
|
|
14
|
-
width: 1px;
|
|
15
15
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ams-fieldset{border:0;margin-inline:0;padding-block:0;padding-inline:0}.ams-fieldset__legend{color:var(--ams-fieldset-legend-color);font-family:var(--ams-fieldset-legend-font-family);font-size:var(--ams-fieldset-legend-font-size);font-weight:var(--ams-fieldset-legend-font-weight);line-height:var(--ams-fieldset-legend-line-height);margin-block-end:1rem;hyphenate-limit-chars:var(--ams-hyphenation-hyphenate-limit-chars);hyphens:var(--ams-hyphenation-hyphens);overflow-wrap:var(--ams-hyphenation-overflow-wrap);text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;padding-inline:0}/*# sourceMappingURL=fieldset.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/fieldset/fieldset.scss","../../src/common/hyphenation.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"AAeA,cANE,SACA,gBACA,gBACA,iBAWF,sBACE,uCACA,mDACA,+CACA,mDACA,mDACA,sBCvBA,mEACA,uCACA,mDCEA,kCACA,2BACA,8BACA,sBFOA","file":"fieldset.css"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- @license CC0-1.0 -->
|
|
2
|
-
|
|
3
|
-
# Fieldset
|
|
4
|
-
|
|
5
|
-
A component to group related form inputs.
|
|
6
|
-
|
|
7
|
-
## Guidelines
|
|
8
|
-
|
|
9
|
-
- Use Fieldset 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 fieldset when asking for an address.
|
|
10
|
-
- When grouping radio inputs, use `role="radiogroup"` on Fieldset to have this grouping explicitly announced as a radio group. Fieldset has a default role of `group`.
|
|
11
|
-
|
|
12
|
-
## Relevant WCAG Requirements
|
|
13
|
-
|
|
14
|
-
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html): Fieldset labels the purpose of a group of inputs.
|
|
15
|
-
|
|
16
|
-
## References
|
|
17
|
-
|
|
18
|
-
- [Providing a description for groups of form controls using fieldset and legend elements](https://www.w3.org/WAI/WCAG22/Techniques/html/H71)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2+
|
|
3
|
-
* Copyright Gemeente Amsterdam
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
@import "../../common/hyphenation";
|
|
7
|
-
@import "../../common/text-rendering";
|
|
8
|
-
|
|
9
|
-
@mixin reset {
|
|
10
|
-
border: 0;
|
|
11
|
-
margin-inline: 0;
|
|
12
|
-
padding-block: 0;
|
|
13
|
-
padding-inline: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ams-fieldset {
|
|
17
|
-
@include reset;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@mixin reset-legend {
|
|
21
|
-
padding-inline: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ams-fieldset__legend {
|
|
25
|
-
color: var(--ams-fieldset-legend-color);
|
|
26
|
-
font-family: var(--ams-fieldset-legend-font-family);
|
|
27
|
-
font-size: var(--ams-fieldset-legend-font-size);
|
|
28
|
-
font-weight: var(--ams-fieldset-legend-font-weight);
|
|
29
|
-
line-height: var(--ams-fieldset-legend-line-height);
|
|
30
|
-
margin-block-end: 1rem; /* Because of a bug in Chrome we can’t use display grid or flex for this gap */
|
|
31
|
-
|
|
32
|
-
@include hyphenation;
|
|
33
|
-
@include text-rendering;
|
|
34
|
-
@include reset-legend;
|
|
35
|
-
}
|