@amsterdam/design-system-css 3.1.0 → 3.2.1

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/accordion/accordion.css +1 -1
  3. package/dist/accordion/accordion.css.map +1 -1
  4. package/dist/blockquote/blockquote.css +1 -1
  5. package/dist/blockquote/blockquote.css.map +1 -1
  6. package/dist/breadcrumb/breadcrumb.css +1 -1
  7. package/dist/breadcrumb/breadcrumb.css.map +1 -1
  8. package/dist/button/button.css +1 -1
  9. package/dist/button/button.css.map +1 -1
  10. package/dist/date-input/date-input.css +1 -1
  11. package/dist/date-input/date-input.css.map +1 -1
  12. package/dist/description-list/description-list.css +1 -1
  13. package/dist/description-list/description-list.css.map +1 -1
  14. package/dist/dialog/dialog.css +1 -1
  15. package/dist/dialog/dialog.css.map +1 -1
  16. package/dist/document/document.css.map +1 -1
  17. package/dist/error-message/error-message.css +1 -1
  18. package/dist/error-message/error-message.css.map +1 -1
  19. package/dist/field-set/field-set.css +1 -1
  20. package/dist/field-set/field-set.css.map +1 -1
  21. package/dist/figure/figure.css +1 -1
  22. package/dist/figure/figure.css.map +1 -1
  23. package/dist/file-input/file-input.css +1 -1
  24. package/dist/file-input/file-input.css.map +1 -1
  25. package/dist/file-list/file-list.css +1 -1
  26. package/dist/file-list/file-list.css.map +1 -1
  27. package/dist/heading/heading.css +1 -1
  28. package/dist/heading/heading.css.map +1 -1
  29. package/dist/icon-button/icon-button.css +1 -1
  30. package/dist/icon-button/icon-button.css.map +1 -1
  31. package/dist/image-slider/image-slider.css +1 -1
  32. package/dist/image-slider/image-slider.css.map +1 -1
  33. package/dist/index.css +1 -1
  34. package/dist/index.css.map +1 -1
  35. package/dist/link-list/link-list.css +1 -1
  36. package/dist/link-list/link-list.css.map +1 -1
  37. package/dist/menu/menu.css +1 -1
  38. package/dist/menu/menu.css.map +1 -1
  39. package/dist/ordered-list/ordered-list.css +1 -1
  40. package/dist/ordered-list/ordered-list.css.map +1 -1
  41. package/dist/page-footer/page-footer.css +1 -1
  42. package/dist/page-footer/page-footer.css.map +1 -1
  43. package/dist/page-header/page-header.css +1 -1
  44. package/dist/page-header/page-header.css.map +1 -1
  45. package/dist/page-heading/page-heading.deprecated.css +1 -1
  46. package/dist/page-heading/page-heading.deprecated.css.map +1 -1
  47. package/dist/pagination/pagination.css +1 -1
  48. package/dist/pagination/pagination.css.map +1 -1
  49. package/dist/paragraph/paragraph.css +1 -1
  50. package/dist/paragraph/paragraph.css.map +1 -1
  51. package/dist/password-input/password-input.css +1 -1
  52. package/dist/password-input/password-input.css.map +1 -1
  53. package/dist/progress-list/progress-list.css +1 -1
  54. package/dist/progress-list/progress-list.css.map +1 -1
  55. package/dist/search-field/search-field.css +1 -1
  56. package/dist/search-field/search-field.css.map +1 -1
  57. package/dist/select/select.css +1 -1
  58. package/dist/select/select.css.map +1 -1
  59. package/dist/table-of-contents/table-of-contents.css +1 -1
  60. package/dist/table-of-contents/table-of-contents.css.map +1 -1
  61. package/dist/tabs/tabs.css +1 -1
  62. package/dist/tabs/tabs.css.map +1 -1
  63. package/dist/text-area/text-area.css +1 -1
  64. package/dist/text-area/text-area.css.map +1 -1
  65. package/dist/text-input/text-input.css +1 -1
  66. package/dist/text-input/text-input.css.map +1 -1
  67. package/dist/time-input/time-input.css +1 -1
  68. package/dist/time-input/time-input.css.map +1 -1
  69. package/dist/unordered-list/unordered-list.css +1 -1
  70. package/dist/unordered-list/unordered-list.css.map +1 -1
  71. package/documentation/coding-conventions.md +6 -3
  72. package/package.json +4 -4
  73. package/src/common/resets.scss +106 -0
  74. package/src/components/accordion/accordion.scss +3 -10
  75. package/src/components/aspect-ratio/README.md +10 -8
  76. package/src/components/blockquote/blockquote.scss +3 -6
  77. package/src/components/breadcrumb/breadcrumb.scss +3 -6
  78. package/src/components/button/button.scss +3 -8
  79. package/src/components/date-input/date-input.scss +18 -22
  80. package/src/components/description-list/README.md +1 -1
  81. package/src/components/description-list/description-list.scss +54 -23
  82. package/src/components/dialog/dialog.scss +5 -8
  83. package/src/components/document/document.scss +1 -4
  84. package/src/components/error-message/error-message.scss +3 -5
  85. package/src/components/field-set/field-set.scss +14 -34
  86. package/src/components/figure/figure.scss +3 -7
  87. package/src/components/file-input/file-input.scss +4 -2
  88. package/src/components/file-list/file-list.scss +3 -7
  89. package/src/components/heading/heading.scss +3 -5
  90. package/src/components/icon-button/icon-button.scss +3 -11
  91. package/src/components/image-slider/image-slider.scss +8 -9
  92. package/src/components/link-list/link-list.scss +3 -7
  93. package/src/components/logo/README.md +0 -2
  94. package/src/components/menu/menu.scss +3 -7
  95. package/src/components/ordered-list/ordered-list.scss +4 -8
  96. package/src/components/page-footer/page-footer.scss +3 -7
  97. package/src/components/page-header/README.md +2 -1
  98. package/src/components/page-header/page-header.scss +30 -38
  99. package/src/components/page-heading/page-heading.deprecated.scss +3 -5
  100. package/src/components/pagination/pagination.scss +3 -8
  101. package/src/components/paragraph/paragraph.scss +4 -6
  102. package/src/components/password-input/password-input.scss +5 -14
  103. package/src/components/progress-list/progress-list.scss +11 -16
  104. package/src/components/search-field/search-field.scss +5 -12
  105. package/src/components/select/select.scss +3 -6
  106. package/src/components/spotlight/README.md +7 -3
  107. package/src/components/table-of-contents/table-of-contents.scss +3 -7
  108. package/src/components/tabs/tabs.scss +4 -11
  109. package/src/components/text-area/text-area.scss +5 -14
  110. package/src/components/text-input/text-input.scss +5 -14
  111. package/src/components/time-input/time-input.scss +17 -19
  112. package/src/components/unordered-list/unordered-list.scss +3 -7
@@ -4,13 +4,9 @@
4
4
  */
5
5
 
6
6
  @use "../../common/hyphenation" as *;
7
+ @use "../../common/resets" as *;
7
8
  @use "../../common/text-rendering" as *;
8
9
 
9
- @mixin reset-ul {
10
- margin-block: 0;
11
- padding-inline: 0;
12
- }
13
-
14
10
  .ams-table-of-contents {
15
11
  display: flex;
16
12
  flex-direction: column;
@@ -22,15 +18,15 @@
22
18
  }
23
19
 
24
20
  .ams-table-of-contents__list {
21
+ @include reset-ul;
22
+
25
23
  box-sizing: border-box;
26
24
  display: flex;
27
25
  flex-direction: column;
28
26
  gap: var(--ams-table-of-contents-list-gap);
29
- list-style: none;
30
27
 
31
28
  @include hyphenation;
32
29
  @include text-rendering;
33
- @include reset-ul;
34
30
 
35
31
  .ams-table-of-contents__list {
36
32
  padding-block-start: var(--ams-table-of-contents-list-list-padding-block-start);
@@ -4,15 +4,7 @@
4
4
  */
5
5
 
6
6
  @use "../../common/breakpoint" as *;
7
-
8
- @mixin reset-button {
9
- background-color: transparent;
10
- border: none;
11
- margin-block: 0; // [1]
12
- margin-inline: 0; // [1]
13
-
14
- // [1] Remove the margin in older Safari.
15
- }
7
+ @use "../../common/resets" as *;
16
8
 
17
9
  .ams-tabs {
18
10
  display: grid;
@@ -26,6 +18,9 @@
26
18
  }
27
19
 
28
20
  .ams-tabs__button {
21
+ @include reset-button;
22
+
23
+ background-color: transparent;
29
24
  color: var(--ams-tabs-button-color);
30
25
  cursor: var(--ams-tabs-button-cursor);
31
26
  display: grid;
@@ -38,8 +33,6 @@
38
33
  padding-block: var(--ams-tabs-button-padding-block);
39
34
  padding-inline: var(--ams-tabs-button-padding-inline);
40
35
 
41
- @include reset-button;
42
-
43
36
  &:disabled {
44
37
  color: var(--ams-tabs-button-disabled-color);
45
38
  cursor: var(--ams-tabs-button-disabled-cursor);
@@ -3,16 +3,12 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/resets" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
- @mixin reset-textarea {
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-radius: 0; // Reset rounded borders on iOS devices
12
- margin-block: 0;
13
- }
14
-
15
9
  .ams-text-area {
10
+ @include reset-textarea;
11
+
16
12
  background-color: var(--ams-text-area-background-color);
17
13
  border-color: var(--ams-text-area-border-color);
18
14
  border-style: var(--ams-text-area-border-style);
@@ -32,17 +28,12 @@
32
28
  touch-action: manipulation;
33
29
 
34
30
  @include text-rendering;
35
- @include reset-textarea;
36
- }
37
-
38
- @mixin reset-placeholder {
39
- opacity: 100%; // Reset lower opacity set by Firefox
40
31
  }
41
32
 
42
33
  .ams-text-area::placeholder {
43
- color: var(--ams-text-area-placeholder-color);
44
-
45
34
  @include reset-placeholder;
35
+
36
+ color: var(--ams-text-area-placeholder-color);
46
37
  }
47
38
 
48
39
  .ams-text-area:disabled {
@@ -3,16 +3,12 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/resets" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
- @mixin reset-input {
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-radius: 0; // Reset rounded borders on iOS devices
12
- margin-block: 0;
13
- }
14
-
15
9
  .ams-text-input {
10
+ @include reset-input;
11
+
16
12
  background-color: var(--ams-text-input-background-color);
17
13
  border-color: var(--ams-text-input-border-color);
18
14
  border-style: var(--ams-text-input-border-style);
@@ -30,21 +26,16 @@
30
26
  touch-action: manipulation;
31
27
 
32
28
  @include text-rendering;
33
- @include reset-input;
34
29
  }
35
30
 
36
31
  .ams-text-input:not([size]) {
37
32
  inline-size: 100%;
38
33
  }
39
34
 
40
- @mixin reset-placeholder {
41
- opacity: 100%; // Reset lower opacity set by Firefox
42
- }
43
-
44
35
  .ams-text-input::placeholder {
45
- color: var(--ams-text-input-placeholder-color);
46
-
47
36
  @include reset-placeholder;
37
+
38
+ color: var(--ams-text-input-placeholder-color);
48
39
  }
49
40
 
50
41
  .ams-text-input:disabled {
@@ -3,27 +3,12 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/resets" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
- @mixin reset-input {
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-radius: 0; // Reset rounded borders on iOS devices
12
- inline-size: auto; // Reset inline size of 10em set by Android devices
13
- margin-block: 0;
14
-
15
- &::-webkit-datetime-edit,
16
- &::-webkit-datetime-edit-ampm-field,
17
- &::-webkit-datetime-edit-fields-wrapper,
18
- &::-webkit-datetime-edit-hour-field,
19
- &::-webkit-datetime-edit-millisecond-field,
20
- &::-webkit-datetime-edit-minute-field,
21
- &::-webkit-datetime-edit-second-field {
22
- padding-block: 0; // Override value of 1px in UA stylesheet
23
- }
24
- }
25
-
26
9
  .ams-time-input {
10
+ @include reset-input;
11
+
27
12
  background-color: var(--ams-time-input-background-color);
28
13
  border-color: var(--ams-time-input-border-color);
29
14
  border-style: var(--ams-time-input-border-style);
@@ -33,6 +18,9 @@
33
18
  font-family: var(--ams-time-input-font-family);
34
19
  font-size: var(--ams-time-input-font-size);
35
20
  font-weight: var(--ams-time-input-font-weight);
21
+
22
+ // Reset inline size of 10em set by Android devices.
23
+ inline-size: auto;
36
24
  line-height: var(--ams-time-input-line-height);
37
25
 
38
26
  // Set min block size for iOS, otherwise an empty box is a lot smaller than a filled one.
@@ -48,7 +36,17 @@
48
36
  touch-action: manipulation;
49
37
 
50
38
  @include text-rendering;
51
- @include reset-input;
39
+
40
+ // Reset padding on webkit time edit fields to override the value of 1px in the UA stylesheet.
41
+ &::-webkit-datetime-edit,
42
+ &::-webkit-datetime-edit-ampm-field,
43
+ &::-webkit-datetime-edit-fields-wrapper,
44
+ &::-webkit-datetime-edit-hour-field,
45
+ &::-webkit-datetime-edit-millisecond-field,
46
+ &::-webkit-datetime-edit-minute-field,
47
+ &::-webkit-datetime-edit-second-field {
48
+ padding-block: 0;
49
+ }
52
50
  }
53
51
 
54
52
  // This changes the default calendar icon on Chromium browsers only
@@ -4,22 +4,18 @@
4
4
  */
5
5
 
6
6
  @use "../../common/hyphenation" as *;
7
+ @use "../../common/resets" as *;
7
8
  @use "../../common/text-rendering" as *;
8
9
 
9
- @mixin reset-ul {
10
- list-style: none;
11
- margin-block: 0;
12
- padding-inline-start: 0;
13
- }
14
-
15
10
  .ams-unordered-list {
11
+ @include reset-ul;
12
+
16
13
  box-sizing: border-box;
17
14
  display: grid;
18
15
  gap: var(--ams-unordered-list-gap);
19
16
 
20
17
  @include hyphenation;
21
18
  @include text-rendering;
22
- @include reset-ul;
23
19
  }
24
20
 
25
21
  .ams-unordered-list:not(.ams-unordered-list--no-markers) {