@castlabs/ui 7.0.10 → 7.1.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.
Files changed (38) hide show
  1. package/dist/castlabs-ui-editor.css +1 -1
  2. package/dist/castlabs-ui-editor.umd.js +1 -1
  3. package/dist/castlabs-ui.common.js +3 -3
  4. package/dist/castlabs-ui.common.js.map +1 -1
  5. package/dist/castlabs-ui.css +2 -2
  6. package/dist/castlabs-ui.umd.js +5 -5
  7. package/dist/castlabs-ui.umd.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/ClAlert/style.scss +1 -1
  10. package/src/components/ClBadge/style.variables.scss +6 -4
  11. package/src/components/ClButton/style.scss +2 -3
  12. package/src/components/ClCard/style.scss +1 -1
  13. package/src/components/ClCard/style.variables.scss +2 -3
  14. package/src/components/ClDropdown/style.scss +2 -2
  15. package/src/components/ClList/style.scss +4 -0
  16. package/src/components/ClList/style.variables.scss +20 -0
  17. package/src/components/ClPagination/style.scss +5 -1
  18. package/src/components/ClTabs/style.scss +2 -1
  19. package/src/components/ClToggle/style.scss +1 -1
  20. package/src/components/form/ClFieldCheck/style.scss +3 -1
  21. package/src/components/form/ClFieldFile/style.scss +3 -3
  22. package/src/components/form/ClFieldGroup/style.scss +3 -3
  23. package/src/components/form/ClFieldInput/style.scss +1 -1
  24. package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +2 -2
  25. package/src/components/navigation/ClNavTop/style.scss +2 -2
  26. package/src/fonts/FontAwesome5/FontAwesome5.scss +2 -2
  27. package/src/styles/_global.scss +0 -13
  28. package/src/styles/abstracts/color.scss +17 -19
  29. package/src/styles/abstracts/spacing.scss +0 -1
  30. package/src/styles/abstracts/tools.scss +7 -0
  31. package/src/styles/components/button.variables.scss +7 -9
  32. package/src/styles/components/form.variables.scss +8 -8
  33. package/src/styles/layout/color.scss +2 -0
  34. package/src/styles/layout/scrollbar.scss +11 -0
  35. package/src/styles/layout/spacing.scss +1 -1
  36. package/src/styles/layout/typography.scss +3 -4
  37. package/src/styles/layout/typography.variables.scss +21 -11
  38. package/src/styles/ui.scss +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castlabs/ui",
3
- "version": "7.0.10",
3
+ "version": "7.1.0",
4
4
  "repository": "https://github.com/castlabs/ui-styleguide",
5
5
  "private": false,
6
6
  "description": "A vanilla HTML/CS/JS & Vue.js component library for Castlabs.",
@@ -108,7 +108,7 @@
108
108
  border: 0;
109
109
  display: inline-block;
110
110
  font-weight: 500;
111
- line-height: 1em;
111
+ line-height: 1;
112
112
  padding: 0;
113
113
  text-decoration: underline;
114
114
  }
@@ -2,7 +2,6 @@ $badge-color-fg: $color-ci-white;
2
2
  $badge-color-bg: $color-dark;
3
3
  $badge-padding: px(4) px(8);
4
4
  $badge-min-height: 1.642857143em; // 23px @ 14pt
5
- $badge-baseline-shift: 0.055555em; // 1px @ 14pt
6
5
 
7
6
  @mixin cl-badge-small {
8
7
  font-size: px(12);
@@ -19,7 +18,7 @@ $badge-baseline-shift: 0.055555em; // 1px @ 14pt
19
18
  color: var(--cl-color-text);
20
19
  display: inline-block;
21
20
  letter-spacing: 0;
22
- line-height: 1em;
21
+ line-height: 1;
23
22
  padding: px(5) px(16);
24
23
  text-transform: uppercase;
25
24
  white-space: nowrap;
@@ -36,7 +35,7 @@ $badge-baseline-shift: 0.055555em; // 1px @ 14pt
36
35
  }
37
36
 
38
37
  i {
39
- line-height: 0.75em;
38
+ line-height: 0.75;
40
39
  margin-right: $spacing-micro;
41
40
  }
42
41
  }
@@ -44,7 +43,9 @@ $badge-baseline-shift: 0.055555em; // 1px @ 14pt
44
43
  %cl-badge-derived {
45
44
  @extend %cl-badge;
46
45
 
46
+ background-color: transparent;
47
47
  border: 0;
48
+ box-shadow: 0 0 0 $brand-line-width $color-ci-clay inset;
48
49
  content: ' ';
49
50
  padding: 0 0 0 $spacing-tiny;
50
51
 
@@ -62,8 +63,9 @@ $badge-baseline-shift: 0.055555em; // 1px @ 14pt
62
63
  &::before {
63
64
  @include cl-fontawesome('\f064');
64
65
 
66
+ color: $color-ci-clay;
65
67
  font-size: 0.95em;
66
- line-height: 0.75em;
68
+ line-height: 0.75;
67
69
  position: relative;
68
70
  top: 0;
69
71
  transform: scale(0.75) scaleY(-1) translate(-0.4em, -0.025em);
@@ -36,11 +36,10 @@
36
36
  &.btn-sm {
37
37
  font-size: px(14);
38
38
  font-weight: 700; // repeat as @include overrides
39
- line-height: 1em; // repeat as @include overrides
39
+ line-height: 1; // repeat as @include overrides
40
40
  opacity: 1;
41
41
  overflow: hidden;
42
- padding: typography-sans-baselineshift($spacing-tiny, px(14)) $spacing-medium
43
- typography-sans-baselineunshift($spacing-tiny, px(14));
42
+ padding: px(7) $spacing-medium;
44
43
  }
45
44
  }
46
45
 
@@ -44,7 +44,7 @@ details.card {
44
44
  color: $color-ci-red !important;
45
45
  }
46
46
 
47
- &:focus {
47
+ &:focus-visible {
48
48
  @include cl-color-focus-outline;
49
49
 
50
50
  border-radius: $brand-border-radius;
@@ -112,7 +112,7 @@ $card-spacing-tight: $spacing-small;
112
112
  }
113
113
 
114
114
  .card-footer {
115
- line-height: 0.5em;
115
+ line-height: 0.5;
116
116
  }
117
117
 
118
118
  > .list-group {
@@ -179,8 +179,7 @@ $card-spacing-tight: $spacing-small;
179
179
 
180
180
  %cl-tight {
181
181
  .card-header {
182
- padding: typography-sans-baselineshift($card-spacing-tight * 0.75, px(16)) $card-spacing-tight
183
- typography-sans-baselineunshift($card-spacing-tight * 0.75, px(16));
182
+ padding: $card-spacing-tight * 0.75 $card-spacing-tight;
184
183
  }
185
184
 
186
185
  .card-body {
@@ -9,7 +9,7 @@
9
9
  $dropdown-border: 0.125rem; // a 2px border to add so there is space for the outline
10
10
  $dropdown-color-chevron: rgba($color-ci-white, 0.5);
11
11
  $dropdown-color-chevron-bright: rgba($color-ci-clay, 0.5);
12
- $dropdown-line-height: 1.25em;
12
+ $dropdown-line-height: 1.25;
13
13
 
14
14
  .cl-dropdown {
15
15
  position: relative;
@@ -90,7 +90,7 @@ $dropdown-line-height: 1.25em;
90
90
  font-size: px(14);
91
91
  font-weight: 500;
92
92
  letter-spacing: 0;
93
- line-height: 1.4em;
93
+ line-height: 1.4;
94
94
  margin-top: 0;
95
95
  opacity: $color-hover-opacity;
96
96
  }
@@ -83,6 +83,10 @@ main {
83
83
  }
84
84
  }
85
85
 
86
+ ol.cl-list {
87
+ @extend %cl-list-number;
88
+ }
89
+
86
90
  // --- definition lists --------------------------------------------------------
87
91
 
88
92
  .cl-dl {
@@ -88,6 +88,26 @@ $list-indent: $spacing-large;
88
88
  }
89
89
  }
90
90
 
91
+ %cl-list-number {
92
+ counter-reset: item;
93
+
94
+ li {
95
+ margin-left: -$spacing-micro;
96
+
97
+ &::before {
98
+ @extend %cl-p-pre;
99
+
100
+ color: var(--cl-color-accent);
101
+ content: counter(item) '.';
102
+ counter-increment: item;
103
+ font-size: px(16);
104
+ font-weight: 700;
105
+ margin-right: $spacing-micro;
106
+ position: static;
107
+ text-align: end;
108
+ }
109
+ }
110
+ }
91
111
  // -----------------------------------------------------------------------------
92
112
 
93
113
  $list-dt-width: 14rem;
@@ -30,9 +30,13 @@
30
30
  border-radius: $brand-border-radius !important; // overrule BS
31
31
  font-size: px(14);
32
32
  font-weight: 500;
33
- line-height: px(18);
33
+ line-height: 1.25;
34
34
  min-width: 36px;
35
35
  padding: $spacing-tiny;
36
+
37
+ &:focus {
38
+ box-shadow: none;
39
+ }
36
40
  }
37
41
 
38
42
  .page-item {
@@ -34,6 +34,7 @@
34
34
  label {
35
35
  @extend %cl-p-form-label;
36
36
 
37
+ border-radius: $brand-border-radius * 0.75; // only for focus outlines
37
38
  cursor: pointer;
38
39
  margin: 0 $spacing-micro;
39
40
  min-width: $spacing-huge * 2 + $spacing-tiny * 2;
@@ -73,7 +74,7 @@
73
74
  }
74
75
 
75
76
  @for $i from 1 through 16 {
76
- .cl-tab-#{$i}:focus ~ ul {
77
+ .cl-tab-#{$i}:focus-visible ~ ul {
77
78
  .cl-tab-#{$i} label {
78
79
  @include cl-color-focus-outline-raw;
79
80
  }
@@ -34,7 +34,7 @@
34
34
  }
35
35
  }
36
36
 
37
- &:focus + .cl-badge {
37
+ &:focus-visible + .cl-badge {
38
38
  @include cl-color-focus-outline-raw;
39
39
  }
40
40
 
@@ -18,6 +18,8 @@ $form-check-background: $color-ci-eggshell;
18
18
  }
19
19
 
20
20
  .form-check-input {
21
+ @include no-focus;
22
+
21
23
  margin-left: -$spacing-medium;
22
24
  margin-right: $spacing-micro;
23
25
  margin-top: 0.25em;
@@ -64,7 +66,7 @@ $form-check-background: $color-ci-eggshell;
64
66
  }
65
67
  }
66
68
 
67
- &:focus {
69
+ &:focus-visible {
68
70
  @include cl-color-focus-outline($color-selected, 2px);
69
71
  }
70
72
 
@@ -21,13 +21,13 @@
21
21
  width: 0;
22
22
  }
23
23
 
24
- &:focus + .cl-file-companion {
24
+ &:focus-visible + .cl-file-companion {
25
25
  @include cl-form-focus-embed();
26
26
  @include cl-color-focus-outline-raw;
27
27
  }
28
28
 
29
- &[invalid]:focus + .cl-file-companion,
30
- &.invalid:focus + .cl-file-companion {
29
+ &[invalid]:focus-visible + .cl-file-companion,
30
+ &.invalid:focus-visible + .cl-file-companion {
31
31
  border-color: $color-ci-clay;
32
32
  }
33
33
 
@@ -36,9 +36,9 @@
36
36
  &:not(.btn) {
37
37
  border-left-width: 0;
38
38
 
39
- &:focus,
40
- &.invalid:focus {
41
- box-shadow: -$brand-line-width 0 0 $color-focus !important; // sass-lint:disable-line no-important
39
+ &:focus-visible,
40
+ &.invalid:focus-visible {
41
+ box-shadow: 0 0 0 1px $color-ci-berry inset !important;
42
42
  }
43
43
  }
44
44
 
@@ -110,7 +110,7 @@
110
110
  width: $spacing-medium;
111
111
  }
112
112
 
113
- &:focus {
113
+ &:focus-visible {
114
114
  @include cl-color-focus-outline(var(--cl-color-focus), 2px);
115
115
  }
116
116
  }
@@ -282,7 +282,7 @@ $sidenav-color-app: #3b4253; // color.adjust($sidenav-color-account, $lightness:
282
282
  display: inline-block;
283
283
  font-weight: 500;
284
284
  letter-spacing: 0.025em;
285
- line-height: 1.5em;
285
+ line-height: 1.5;
286
286
  padding: $spacing-tiny $spacing-small;
287
287
  position: relative;
288
288
  width: 100%;
@@ -292,7 +292,7 @@ $sidenav-color-app: #3b4253; // color.adjust($sidenav-color-account, $lightness:
292
292
 
293
293
  color: $color-ci-ash;
294
294
  letter-spacing: 0.025em;
295
- line-height: 1.4em;
295
+ line-height: 1.4;
296
296
  margin-top: px(3);
297
297
 
298
298
  + .cl-nav-item-info {
@@ -76,7 +76,7 @@
76
76
  }
77
77
 
78
78
  i {
79
- line-height: px(20);
79
+ line-height: 1.25;
80
80
  }
81
81
 
82
82
  a {
@@ -188,7 +188,7 @@ $navbar-item-spacing: $spacing-medium;
188
188
  padding: 0;
189
189
 
190
190
  &:active,
191
- &:focus {
191
+ &:focus-visible {
192
192
  border: 0;
193
193
  box-shadow: none;
194
194
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  .fa-lg {
21
21
  font-size: 1.33333em;
22
- line-height: 0.75em;
22
+ line-height: 0.75;
23
23
  vertical-align: -0.0667em;
24
24
  }
25
25
 
@@ -195,7 +195,7 @@
195
195
  .fa-stack {
196
196
  display: inline-block;
197
197
  height: 2em;
198
- line-height: 2em;
198
+ line-height: 2;
199
199
  position: relative;
200
200
  vertical-align: middle;
201
201
  width: 2.5em;
@@ -57,16 +57,3 @@
57
57
  %spacing-none {
58
58
  margin-top: 0;
59
59
  }
60
-
61
- // --- other -------------------------------------------------------------------
62
-
63
- @mixin focus-glow-embed($color) {
64
- box-shadow: 0 0 0 $btn-focus-width rgba($color, 0.5); // sass-lint:disable-line no-color-literals
65
- outline: 0;
66
- }
67
-
68
- @mixin focus-glow($color) {
69
- &:focus {
70
- @include focus-glow-embed($color);
71
- }
72
- }
@@ -50,7 +50,7 @@ $color-disabled: $color-ci-clay;
50
50
  $color-text: $color-ci-night;
51
51
  $color-selected: $color-ci-red;
52
52
  $color-accent: $color-ci-petrol;
53
- $color-focus: $color-ci-night;
53
+ $color-focus: $color-ci-petrol;
54
54
  $color-background: $color-ci-white;
55
55
  $color-code-background: rgb(16 0 0 / 5%); // transparent to work on different colors
56
56
 
@@ -67,9 +67,7 @@ $bar-ui-width: px(4);
67
67
  }
68
68
 
69
69
  @mixin cl-color-focus-outline($color: var(--cl-color-focus), $offset: -3px) {
70
- &:focus,
71
- &:focus-visible,
72
- &:focus-within {
70
+ &:focus-visible {
73
71
  @include cl-color-focus-outline-raw($color, $offset);
74
72
  }
75
73
  }
@@ -134,7 +132,7 @@ $bar-ui-width: px(4);
134
132
  #{'--cl-color-link'}: $color-ci-berry;
135
133
  #{'--cl-color-active'}: $color-ci-berry;
136
134
  #{'--cl-color-hover'}: $color-ci-red;
137
- #{'--cl-color-focus'}: rgba($color-ci-night, 0.5);
135
+ #{'--cl-color-focus'}: $color-ci-night;
138
136
  }
139
137
 
140
138
  %cl-color-night-outline {
@@ -146,7 +144,7 @@ $bar-ui-width: px(4);
146
144
  #{'--cl-color-accent'}: $color-ci-night;
147
145
  #{'--cl-color-highlight'}: rgba(#fff, 0.85);
148
146
  #{'--cl-color-link'}: $color-ci-berry;
149
- #{'--cl-color-focus'}: rgba($color-ci-night, 0.5);
147
+ #{'--cl-color-focus'}: $color-ci-night;
150
148
  }
151
149
 
152
150
  %cl-color-red {
@@ -157,7 +155,7 @@ $bar-ui-width: px(4);
157
155
  #{'--cl-color-accent'}: $color-ci-eggshell;
158
156
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
159
157
  #{'--cl-color-link'}: $color-ci-eggshell;
160
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
158
+ #{'--cl-color-focus'}: $color-ci-eggshell;
161
159
  }
162
160
 
163
161
  %cl-color-red-outline {
@@ -167,7 +165,7 @@ $bar-ui-width: px(4);
167
165
  #{'--cl-color-accent'}: $color-ci-red;
168
166
  #{'--cl-color-highlight'}: rgba(#fff, 0.85);
169
167
  #{'--cl-color-link'}: $color-ci-berry;
170
- #{'--cl-color-focus'}: rgba($color-ci-red, 0.5);
168
+ #{'--cl-color-focus'}: $color-ci-red;
171
169
  }
172
170
 
173
171
  %cl-color-sky {
@@ -178,7 +176,7 @@ $bar-ui-width: px(4);
178
176
  #{'--cl-color-accent'}: $color-ci-night;
179
177
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
180
178
  #{'--cl-color-link'}: $color-ci-night;
181
- #{'--cl-color-focus'}: rgba($color-ci-night, 0.5);
179
+ #{'--cl-color-focus'}: $color-ci-night;
182
180
  }
183
181
 
184
182
  %cl-color-night {
@@ -189,7 +187,7 @@ $bar-ui-width: px(4);
189
187
  #{'--cl-color-accent'}: $color-ci-eggshell;
190
188
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
191
189
  #{'--cl-color-link'}: $color-ci-eggshell;
192
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
190
+ #{'--cl-color-focus'}: $color-ci-eggshell;
193
191
  }
194
192
 
195
193
  %cl-color-eggshell {
@@ -200,7 +198,7 @@ $bar-ui-width: px(4);
200
198
  #{'--cl-color-accent'}: $color-ci-night;
201
199
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
202
200
  #{'--cl-color-link'}: $color-ci-berry;
203
- #{'--cl-color-focus'}: rgba($color-ci-night, 0.5);
201
+ #{'--cl-color-focus'}: $color-ci-night;
204
202
  }
205
203
 
206
204
  %cl-color-clay {
@@ -211,7 +209,7 @@ $bar-ui-width: px(4);
211
209
  #{'--cl-color-accent'}: $color-ci-night;
212
210
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
213
211
  #{'--cl-color-link'}: $color-ci-night;
214
- #{'--cl-color-focus'}: rgba($color-ci-night, 0.5);
212
+ #{'--cl-color-focus'}: $color-ci-night;
215
213
  }
216
214
 
217
215
  %cl-color-ash {
@@ -222,7 +220,7 @@ $bar-ui-width: px(4);
222
220
  #{'--cl-color-accent'}: $color-ci-eggshell;
223
221
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
224
222
  #{'--cl-color-link'}: $color-ci-eggshell;
225
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
223
+ #{'--cl-color-focus'}: $color-ci-eggshell;
226
224
  }
227
225
 
228
226
  %cl-color-petrol {
@@ -233,7 +231,7 @@ $bar-ui-width: px(4);
233
231
  #{'--cl-color-accent'}: $color-ci-eggshell;
234
232
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
235
233
  #{'--cl-color-link'}: $color-ci-eggshell;
236
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
234
+ #{'--cl-color-focus'}: $color-ci-eggshell;
237
235
  }
238
236
 
239
237
  %cl-color-berry {
@@ -244,7 +242,7 @@ $bar-ui-width: px(4);
244
242
  #{'--cl-color-accent'}: $color-ci-eggshell;
245
243
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
246
244
  #{'--cl-color-link'}: $color-ci-eggshell;
247
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
245
+ #{'--cl-color-focus'}: $color-ci-eggshell;
248
246
  }
249
247
 
250
248
  %cl-color-transparent {
@@ -255,7 +253,7 @@ $bar-ui-width: px(4);
255
253
  #{'--cl-color-accent'}: $color-ci-eggshell;
256
254
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
257
255
  #{'--cl-color-link'}: $color-ci-eggshell;
258
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
256
+ #{'--cl-color-focus'}: $color-ci-eggshell;
259
257
  }
260
258
 
261
259
  %cl-color-disabled {
@@ -266,7 +264,7 @@ $bar-ui-width: px(4);
266
264
  #{'--cl-color-accent'}: $color-disabled;
267
265
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
268
266
  #{'--cl-color-link'}: $color-disabled;
269
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
267
+ #{'--cl-color-focus'}: $color-ci-eggshell;
270
268
  }
271
269
 
272
270
  %cl-color-faded {
@@ -277,7 +275,7 @@ $bar-ui-width: px(4);
277
275
  #{'--cl-color-accent'}: $color-ci-ash;
278
276
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
279
277
  #{'--cl-color-link'}: $color-ci-ash;
280
- #{'--cl-color-focus'}: rgba($color-ci-ash, 0.5);
278
+ #{'--cl-color-focus'}: $color-ci-ash;
281
279
  }
282
280
 
283
281
  %cl-color-none {
@@ -285,7 +283,7 @@ $bar-ui-width: px(4);
285
283
  #{'--cl-color-border'}: transparent;
286
284
  #{'--cl-color-highlight'}: rgba(#fff, 0.1);
287
285
  #{'--cl-color-link'}: $color-ci-eggshell;
288
- #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
286
+ #{'--cl-color-focus'}: $color-ci-eggshell;
289
287
  }
290
288
 
291
289
  // ----------------------------------------------
@@ -14,7 +14,6 @@ $spacing-large: px(32);
14
14
  $spacing-huge: px(48);
15
15
 
16
16
  $header-nav-height: px(40);
17
- $header-headline-height: px(80);
18
17
 
19
18
  @mixin spacing-before-auto($value) {
20
19
  margin-bottom: 0;
@@ -33,3 +33,10 @@
33
33
  #{$property}: $new-value;
34
34
  }
35
35
  }
36
+
37
+ @mixin no-focus {
38
+ &:focus {
39
+ box-shadow: none;
40
+ outline: none;
41
+ }
42
+ }
@@ -10,11 +10,10 @@
10
10
  display: inline-block;
11
11
  font-size: px(18);
12
12
  font-weight: 700; // repeat as @include overrides
13
- line-height: 1em; // repeat as @include overrides
13
+ line-height: 1; // repeat as @include overrides
14
14
  opacity: 1;
15
15
  overflow: hidden;
16
- padding: typography-sans-baselineshift($spacing-tiny, px(18)) $spacing-large
17
- typography-sans-baselineunshift($spacing-tiny, px(18));
16
+ padding: $spacing-tiny $spacing-large;
18
17
  text-align: center;
19
18
  text-decoration: none;
20
19
  transition: opacity 0.15s;
@@ -52,8 +51,8 @@
52
51
  }
53
52
 
54
53
  // our focus (tab'ed) buttons look the same but are outlined
55
- .btn-check:focus + &,
56
- &:focus {
54
+ .btn-check:focus-visible + &,
55
+ &:focus-visible {
57
56
  background-color: var(--cl-color-background);
58
57
  border-color: var(--cl-color-border);
59
58
  color: var(--cl-color-text);
@@ -75,15 +74,14 @@
75
74
  }
76
75
  }
77
76
 
78
- &:active,
79
- &:active:focus {
77
+ &:active {
80
78
  outline: 0 !important;
81
79
  }
82
80
  }
83
81
 
84
82
  @mixin cl-button-focus-outline() {
85
- .btn-check:focus + &,
86
- &:focus {
83
+ .btn-check:focus-visible + &,
84
+ &:focus-visible {
87
85
  @include cl-color-focus-outline;
88
86
 
89
87
  box-shadow: none;
@@ -6,7 +6,7 @@
6
6
  // This file defines form/input field variables
7
7
 
8
8
  $form-field-fontsize: px(16);
9
- $form-field-line-height: px(22);
9
+ $form-field-line-height: 1.375;
10
10
  $form-field-min-height: px(36);
11
11
  $form-field-border-color: $color-ci-ash;
12
12
  $form-field-border: $brand-line-width solid $form-field-border-color;
@@ -48,17 +48,17 @@ $form-spacing-label-input: px(2);
48
48
  }
49
49
 
50
50
  @mixin cl-form-focus-embed {
51
- @include cl-button-focus-outline; // additional inner outline
52
-
53
- border-color: $color-focus !important;
51
+ border-color: $color-ci-berry !important;
54
52
  box-shadow: none;
55
- color: $color-focus;
53
+ box-shadow: 0 0 0 1px $color-ci-berry inset;
54
+ color: var(--cl-color-text);
55
+ outline: none;
56
56
  }
57
57
 
58
58
  @mixin cl-form-focus {
59
- &:focus,
60
- &:focus:first-child,
61
- &:focus:last-child {
59
+ &:focus-visible,
60
+ &:focus-visible:first-child,
61
+ &:focus-visible:last-child {
62
62
  @include cl-form-focus-embed;
63
63
  }
64
64
  }
@@ -17,6 +17,7 @@
17
17
  @extend %cl-color-night-outline;
18
18
  }
19
19
 
20
+ .cl-color-primary,
20
21
  .cl-color-red {
21
22
  @extend %cl-color-red;
22
23
  }
@@ -29,6 +30,7 @@
29
30
  @extend %cl-color-sky;
30
31
  }
31
32
 
33
+ .cl-color-secondary,
32
34
  .cl-color-black,
33
35
  .cl-color-text, // legacy name
34
36
  .cl-color-dark, // legacy name
@@ -0,0 +1,11 @@
1
+ ////
2
+ /// @group layout
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines tweaks scrollbars for rounded boxes and uses our CI colors.
7
+
8
+ main,
9
+ .cl-section {
10
+ scrollbar-color: $color-ci-clay transparent;
11
+ }
@@ -173,7 +173,7 @@ main {
173
173
  }
174
174
 
175
175
  @mixin spacing-box-x($spacing) {
176
- line-height: 1em;
176
+ line-height: 1;
177
177
 
178
178
  > *,
179
179
  > *:first-child {
@@ -183,12 +183,10 @@ main {
183
183
 
184
184
  // --- code & monospace --------------------------------------------------------
185
185
 
186
- pre,
187
186
  kbd,
188
187
  code,
189
188
  samp {
190
189
  @extend %cl-p-pre;
191
- @include cl-color-focus-outline;
192
190
 
193
191
  color: var(--cl-color-text);
194
192
  }
@@ -199,7 +197,8 @@ main {
199
197
  }
200
198
 
201
199
  pre {
202
- padding: $spacing-tiny;
200
+ @extend %cl-p-pre-box;
201
+ @include cl-color-focus-outline;
203
202
 
204
203
  code {
205
204
  padding: 0;
@@ -280,6 +279,6 @@ hr {
280
279
  // --- text select -------------------------------------------------------------
281
280
 
282
281
  ::selection {
283
- background: $color-ci-night;
282
+ background: $color-ci-berry;
284
283
  color: $color-ci-white;
285
284
  }