modus-bootstrap 6.0.0-alpha.1 → 6.0.0-alpha.2

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 (126) hide show
  1. package/.browserslistrc +5 -5
  2. package/LICENSE +0 -0
  3. package/README.md +46 -89
  4. package/dist/css/modus-bootstrap-grid.css +684 -185
  5. package/dist/css/modus-bootstrap-grid.css.map +1 -1
  6. package/dist/css/modus-bootstrap-grid.min.css +2 -2
  7. package/dist/css/modus-bootstrap-grid.min.css.map +1 -1
  8. package/dist/css/modus-bootstrap-reboot.css +15 -6
  9. package/dist/css/modus-bootstrap-reboot.css.map +1 -1
  10. package/dist/css/modus-bootstrap-reboot.min.css +2 -2
  11. package/dist/css/modus-bootstrap-reboot.min.css.map +1 -1
  12. package/dist/css/modus-bootstrap-utilities.css +63 -56
  13. package/dist/css/modus-bootstrap-utilities.css.map +1 -1
  14. package/dist/css/modus-bootstrap-utilities.min.css +2 -2
  15. package/dist/css/modus-bootstrap-utilities.min.css.map +1 -1
  16. package/dist/css/modus-bootstrap.css +2355 -1176
  17. package/dist/css/modus-bootstrap.css.map +1 -1
  18. package/dist/css/modus-bootstrap.min.css +1 -1
  19. package/dist/css/modus-bootstrap.min.css.map +1 -1
  20. package/package.json +40 -38
  21. package/scss/_accordion.scss +12 -5
  22. package/scss/_alert.scss +11 -3
  23. package/scss/_avatar.scss +12 -0
  24. package/scss/_badge.scss +0 -0
  25. package/scss/_banner.scss +1 -1
  26. package/scss/_breadcrumb.scss +8 -1
  27. package/scss/_card.scss +5 -0
  28. package/scss/_carousel.scss +0 -0
  29. package/scss/_chip.scss +14 -9
  30. package/scss/_colors.scss +0 -0
  31. package/scss/_config.scss +1 -0
  32. package/scss/_dialog.scss +45 -13
  33. package/scss/_drawer.scss +56 -42
  34. package/scss/_functions.scss +0 -0
  35. package/scss/_list-group.scss +0 -0
  36. package/scss/_menu.scss +96 -15
  37. package/scss/_nav-overflow.scss +0 -0
  38. package/scss/_nav.scss +6 -0
  39. package/scss/_navbar.scss +2 -7
  40. package/scss/_pagination.scss +1 -1
  41. package/scss/_placeholder.scss +0 -0
  42. package/scss/_popover.scss +31 -0
  43. package/scss/_progress.scss +15 -2
  44. package/scss/_root-modus.scss +5 -2
  45. package/scss/_root.scss +6 -7
  46. package/scss/_spinner.scss +6 -0
  47. package/scss/_stepper.scss +7 -1
  48. package/scss/_theme.scss +0 -0
  49. package/scss/_toasts.scss +0 -0
  50. package/scss/_tooltip.scss +37 -0
  51. package/scss/_transitions.scss +14 -8
  52. package/scss/_utilities.scss +18 -9
  53. package/scss/bootstrap.scss +0 -1
  54. package/scss/buttons/_button-group.scss +0 -0
  55. package/scss/buttons/_button.scss +8 -4
  56. package/scss/buttons/_close.scss +12 -4
  57. package/scss/buttons/index.scss +0 -0
  58. package/scss/content/_blockquote.scss +0 -0
  59. package/scss/content/_images.scss +0 -0
  60. package/scss/content/_lists.scss +1 -1
  61. package/scss/content/_prose.scss +16 -7
  62. package/scss/content/_reboot.scss +16 -2
  63. package/scss/content/_tables.scss +1 -4
  64. package/scss/content/index.scss +0 -0
  65. package/scss/forms/_check.scss +24 -13
  66. package/scss/forms/{_chip-input.scss → _combobox-control.scss} +28 -16
  67. package/scss/forms/_combobox.scss +35 -6
  68. package/scss/{_datepicker.scss → forms/_datepicker.scss} +157 -59
  69. package/scss/forms/_floating-labels.scss +22 -0
  70. package/scss/forms/_form-adorn.scss +15 -1
  71. package/scss/forms/_form-control.scss +1 -1
  72. package/scss/forms/_form-field.scss +2 -1
  73. package/scss/forms/_form-range.scss +45 -7
  74. package/scss/forms/_form-text.scss +0 -2
  75. package/scss/forms/_input-group.scss +0 -0
  76. package/scss/forms/_labels.scss +3 -0
  77. package/scss/forms/_otp-input.scss +68 -13
  78. package/scss/forms/_radio.scss +6 -0
  79. package/scss/forms/_strength.scss +16 -1
  80. package/scss/forms/_switch.scss +11 -2
  81. package/scss/forms/_validation.scss +31 -7
  82. package/scss/forms/index.scss +2 -1
  83. package/scss/helpers/_file-drop-zone.scss +0 -0
  84. package/scss/helpers/_focus-ring.scss +0 -0
  85. package/scss/helpers/_hover-lift.scss +2 -1
  86. package/scss/helpers/_icon-link.scss +0 -0
  87. package/scss/helpers/_position.scss +0 -0
  88. package/scss/helpers/_stacks.scss +0 -0
  89. package/scss/helpers/_stretched-link.scss +0 -0
  90. package/scss/helpers/_text-truncation.scss +0 -0
  91. package/scss/helpers/_theme-colors.scss +0 -0
  92. package/scss/helpers/_visually-hidden.scss +0 -0
  93. package/scss/helpers/_vr.scss +7 -0
  94. package/scss/helpers/index.scss +0 -0
  95. package/scss/layout/_breakpoints.scss +0 -0
  96. package/scss/layout/_containers.scss +0 -0
  97. package/scss/layout/_grid.scss +0 -2
  98. package/scss/layout/index.scss +0 -0
  99. package/scss/mixins/_backdrop.scss +0 -0
  100. package/scss/mixins/_border-radius.scss +0 -0
  101. package/scss/mixins/_box-shadow.scss +0 -0
  102. package/scss/mixins/_color-mode.scss +0 -0
  103. package/scss/mixins/_color-scheme.scss +0 -0
  104. package/scss/mixins/_deprecate.scss +0 -0
  105. package/scss/mixins/_dialog-shared.scss +0 -0
  106. package/scss/mixins/_focus-ring.scss +0 -0
  107. package/scss/mixins/_forced-colors.scss +14 -0
  108. package/scss/mixins/_form-validation.scss +0 -0
  109. package/scss/mixins/_gradients.scss +0 -0
  110. package/scss/mixins/_grid.scss +24 -18
  111. package/scss/mixins/_image.scss +0 -0
  112. package/scss/mixins/_lists.scss +0 -0
  113. package/scss/mixins/_mask-icon.scss +0 -0
  114. package/scss/mixins/_reset-text.scss +0 -0
  115. package/scss/mixins/_resize.scss +0 -0
  116. package/scss/mixins/_text-truncate.scss +0 -0
  117. package/scss/mixins/_tokens.scss +0 -0
  118. package/scss/mixins/_transition.scss +0 -0
  119. package/scss/mixins/_utilities.scss +0 -0
  120. package/scss/mixins/_visually-hidden.scss +1 -1
  121. package/scss/mixins/index.scss +1 -0
  122. package/scss/modus-bootstrap-grid.scss +0 -0
  123. package/scss/modus-bootstrap-reboot.scss +0 -0
  124. package/scss/modus-bootstrap-utilities.scss +0 -0
  125. package/scss/modus-bootstrap.scss +0 -1
  126. package/scss/utilities/_api.scss +0 -0
package/scss/_root.scss CHANGED
@@ -38,7 +38,7 @@ $root-tokens: defaults(
38
38
  --link-hover-color: color-mix(in oklch, var(--link-color) 90%, #000),
39
39
 
40
40
  --font-mono: "ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace",
41
- --code-font-size: 95%,
41
+ --code-font-size: .875em,
42
42
  --code-color: var(--fg-2),
43
43
 
44
44
  // scss-docs-start root-border-var
@@ -89,7 +89,7 @@ $root-tokens: defaults(
89
89
  --btn-input-padding-y: .375rem,
90
90
  --btn-input-padding-x: .75rem,
91
91
  --btn-input-font-size: var(--body-font-size),
92
- --btn-input-font-weight: var(--font-weight-normal),
92
+ --btn-input-font-weight: var(--font-weight-semibold),
93
93
  --btn-input-line-height: var(--body-line-height),
94
94
  --btn-input-border-radius: var(--radius-5),
95
95
 
@@ -179,8 +179,10 @@ $root-tokens: defaults(
179
179
  @each $key, $value in $radii {
180
180
  $root-tokens: map.set($root-tokens, --radius-#{$key}, $value);
181
181
  }
182
- // stylelint-disable-next-line scss/dollar-variable-default
183
- $root-tokens: map.set($root-tokens, --radius-pill, 50rem);
182
+ // There is no `$radii` step for the pill, so keep a value passed through `$root-tokens`.
183
+ @if not map.has-key($root-tokens, --radius-pill) {
184
+ $root-tokens: map.set($root-tokens, --radius-pill, 50rem);
185
+ }
184
186
  // scss-docs-end root-radius-loop
185
187
 
186
188
  // Generate box-shadow tokens
@@ -204,9 +206,6 @@ $root-tokens: map.set($root-tokens, --radius-pill, 50rem);
204
206
  @include tokens($root-tokens);
205
207
 
206
208
  color-scheme: light dark;
207
- // Always reserve the viewport scrollbar gutter so layout doesn't shift
208
- // when overflow: hidden is applied (e.g. when a dialog opens on Windows).
209
- scrollbar-gutter: stable;
210
209
  }
211
210
 
212
211
  // Deepen shadows in dark mode. The shadow-strength token is a plain number, so it
@@ -1,5 +1,6 @@
1
1
  @use "config" as *;
2
2
  @use "functions" as *;
3
+ @use "mixins/forced-colors" as *;
3
4
  @use "mixins/tokens" as *;
4
5
 
5
6
  // stylelint-disable custom-property-no-missing-var-function
@@ -102,6 +103,11 @@ $spinner-grow-tokens: defaults(
102
103
 
103
104
  background-color: currentcolor;
104
105
  opacity: 0;
106
+
107
+ // Forced colors mode removes the background color. Show the circle with an outline.
108
+ @include forced-colors() {
109
+ outline: 1px solid transparent;
110
+ }
105
111
  }
106
112
 
107
113
  .spinner-grow-sm {
@@ -2,6 +2,7 @@
2
2
  @use "functions" as *;
3
3
  @use "layout/breakpoints" as *;
4
4
  @use "mixins/border-radius" as *;
5
+ @use "mixins/forced-colors" as *;
5
6
  @use "mixins/tokens" as *;
6
7
 
7
8
  $stepper-tokens: () !default;
@@ -14,7 +15,7 @@ $stepper-tokens: defaults(
14
15
  --stepper-gap: 1rem,
15
16
  --stepper-font-size: var(--font-size-sm),
16
17
  --stepper-text-gap: .5rem,
17
- --stepper-track-size: .125rem,
18
+ --stepper-track-size: .25rem,
18
19
  --stepper-bg: var(--bg-2),
19
20
  --stepper-active-color: var(--primary-contrast),
20
21
  --stepper-active-bg: var(--primary-bg),
@@ -105,6 +106,11 @@ $stepper-tokens: defaults(
105
106
  height: calc(100% + var(--stepper-gap));
106
107
  content: "";
107
108
  background-color: var(--stepper-bg);
109
+
110
+ // Forced colors mode removes the background color. Show the line with an outline.
111
+ @include forced-colors() {
112
+ outline: 1px solid transparent;
113
+ }
108
114
  }
109
115
 
110
116
  // Avoid sibling selector for easier CSS overrides
package/scss/_theme.scss CHANGED
File without changes
package/scss/_toasts.scss CHANGED
File without changes
@@ -1,6 +1,7 @@
1
1
  @use "config" as *;
2
2
  @use "functions" as *;
3
3
  @use "mixins/border-radius" as *;
4
+ @use "mixins/forced-colors" as *;
4
5
  @use "mixins/reset-text" as *;
5
6
  @use "mixins/tokens" as *;
6
7
  @use "mixins/transition" as *;
@@ -36,6 +37,11 @@ $tooltip-tokens: defaults(
36
37
 
37
38
  z-index: var(--tooltip-zindex);
38
39
  display: block;
40
+ // Keep intrinsic width when left/top-positioned inside a containing block with limited
41
+ // remaining space (e.g. an open <dialog>). Without this, the tooltip shrinks to the gap
42
+ // between its left and the edge, flip/autoUpdate thrash, and placement never settles.
43
+ // See https://floating-ui.com/docs/computeposition#initial-layout.
44
+ width: max-content;
39
45
  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
40
46
  // So reset our font and text properties to avoid inheriting weird values.
41
47
  @include reset-text();
@@ -61,11 +67,21 @@ $tooltip-tokens: defaults(
61
67
  width: var(--tooltip-arrow-width);
62
68
  height: var(--tooltip-arrow-height);
63
69
 
70
+ // Forced colors mode paints the transparent borders, so the arrow shows as
71
+ // a rectangle. Hide them with `Canvas` and draw only the triangle side.
72
+ @include forced-colors() {
73
+ border-block-start-color: Canvas;
74
+ }
75
+
64
76
  &::before {
65
77
  position: absolute;
66
78
  content: "";
67
79
  border-color: transparent;
68
80
  border-style: solid;
81
+
82
+ @include forced-colors() {
83
+ border-color: Canvas;
84
+ }
69
85
  }
70
86
  }
71
87
  }
@@ -83,6 +99,10 @@ $tooltip-tokens: defaults(
83
99
  top: -1px;
84
100
  border-width: var(--tooltip-arrow-height) calc(var(--tooltip-arrow-width) * .5) 0;
85
101
  border-block-start-color: var(--tooltip-bg);
102
+
103
+ @include forced-colors() {
104
+ border-block-start-color: CanvasText;
105
+ }
86
106
  }
87
107
  }
88
108
 
@@ -95,6 +115,10 @@ $tooltip-tokens: defaults(
95
115
  right: -1px;
96
116
  border-width: calc(var(--tooltip-arrow-width) * .5) var(--tooltip-arrow-height) calc(var(--tooltip-arrow-width) * .5) 0;
97
117
  border-inline-end-color: var(--tooltip-bg);
118
+
119
+ @include forced-colors() {
120
+ border-inline-end-color: CanvasText;
121
+ }
98
122
  }
99
123
  }
100
124
 
@@ -105,6 +129,10 @@ $tooltip-tokens: defaults(
105
129
  bottom: -1px;
106
130
  border-width: 0 calc(var(--tooltip-arrow-width) * .5) var(--tooltip-arrow-height);
107
131
  border-block-end-color: var(--tooltip-bg);
132
+
133
+ @include forced-colors() {
134
+ border-block-end-color: CanvasText;
135
+ }
108
136
  }
109
137
  }
110
138
 
@@ -117,6 +145,10 @@ $tooltip-tokens: defaults(
117
145
  left: -1px;
118
146
  border-width: calc(var(--tooltip-arrow-width) * .5) 0 calc(var(--tooltip-arrow-width) * .5) var(--tooltip-arrow-height);
119
147
  border-inline-start-color: var(--tooltip-bg);
148
+
149
+ @include forced-colors() {
150
+ border-inline-start-color: CanvasText;
151
+ }
120
152
  }
121
153
  }
122
154
 
@@ -143,5 +175,10 @@ $tooltip-tokens: defaults(
143
175
  text-align: center;
144
176
  background-color: var(--tooltip-bg);
145
177
  @include border-radius(var(--tooltip-border-radius));
178
+
179
+ // Forced colors mode removes the background color. Show the edge with an outline.
180
+ @include forced-colors() {
181
+ outline: 1px solid transparent;
182
+ }
146
183
  }
147
184
  }
@@ -45,16 +45,11 @@ $collapse-tokens: defaults(
45
45
  // closed state interpolate to the `auto` of the open one, and `display`
46
46
  // transitions discretely, so the element stays laid out until the size reaches
47
47
  // `0`. The animated axis is clipped, so the content cannot spill while it moves.
48
+ // Adding .collapse-instant skips all animations.
48
49
  .collapse {
49
50
  @include tokens($collapse-tokens);
50
51
 
51
52
  overflow-y: clip;
52
- @include transition-props(
53
- var(--transition-collapse-property),
54
- var(--transition-collapse-duration),
55
- var(--transition-collapse-timing),
56
- allow-discrete
57
- );
58
53
 
59
54
  // Browsers without `interpolate-size` open and close the element at once.
60
55
  @media (prefers-reduced-motion: no-preference) {
@@ -68,7 +63,7 @@ $collapse-tokens: defaults(
68
63
 
69
64
  // A closed collapse is not rendered, so the open side needs a start value of
70
65
  // its own. Without it the element appears at full size at once.
71
- &.show {
66
+ &.show:not(.collapse-instant) {
72
67
  @starting-style {
73
68
  block-size: 0;
74
69
  }
@@ -89,11 +84,22 @@ $collapse-tokens: defaults(
89
84
  block-size: auto;
90
85
  }
91
86
 
92
- &.show {
87
+ &.show:not(.collapse-instant) {
93
88
  @starting-style {
94
89
  inline-size: 0;
95
90
  }
96
91
  }
97
92
  }
98
93
  }
94
+ // Put motion in a layer so the transition-none utility can override it.
95
+ @layer components {
96
+ .collapse:not(.collapse-instant) {
97
+ @include transition-props(
98
+ var(--transition-collapse-property),
99
+ var(--transition-collapse-duration),
100
+ var(--transition-collapse-timing),
101
+ allow-discrete
102
+ );
103
+ }
104
+ }
99
105
  // scss-docs-end collapse-classes
@@ -31,8 +31,8 @@ $utilities: map.merge(
31
31
  // scss-docs-start utils-aspect-ratio
32
32
  "aspect-ratio-attr": (
33
33
  selector: "attr-includes",
34
- class: "ratio-",
35
34
  property: aspect-ratio,
35
+ class: "ratio-",
36
36
  values: var(--ratio),
37
37
  ),
38
38
  "aspect-ratio": (
@@ -43,8 +43,8 @@ $utilities: map.merge(
43
43
  // scss-docs-end utils-aspect-ratio
44
44
  // scss-docs-start utils-float
45
45
  "float": (
46
- property: float,
47
46
  responsive: true,
47
+ property: float,
48
48
  values: (
49
49
  start: inline-start,
50
50
  end: inline-end,
@@ -195,8 +195,8 @@ $utilities: map.merge(
195
195
  )
196
196
  ),
197
197
  "border-top": (
198
- class: border-top,
199
198
  property: border-block-start,
199
+ class: border-top,
200
200
  values: (
201
201
  null: var(--border-width) var(--border-style) var(--border-color),
202
202
  0: 0,
@@ -227,16 +227,16 @@ $utilities: map.merge(
227
227
  )
228
228
  ),
229
229
  "border-y": (
230
- class: border-y,
231
230
  property: border-block,
231
+ class: border-y,
232
232
  values: (
233
233
  null: var(--border-width) var(--border-style) var(--border-color),
234
234
  0: 0,
235
235
  )
236
236
  ),
237
237
  "border-x": (
238
- class: border-x,
239
238
  property: border-inline,
239
+ class: border-x,
240
240
  values: (
241
241
  null: var(--border-width) var(--border-style) var(--border-color),
242
242
  0: 0,
@@ -266,8 +266,8 @@ $utilities: map.merge(
266
266
  values: map.merge($border-widths, (keyline: var(--border-width-keyline)))
267
267
  ),
268
268
  "border-opacity": (
269
- class: border,
270
269
  property: border-color,
270
+ class: border-opacity,
271
271
  values: theme-opacity-values(--bc)
272
272
  ),
273
273
  // scss-docs-end utils-border-color
@@ -724,6 +724,15 @@ $utilities: map.merge(
724
724
  values: italic normal
725
725
  ),
726
726
  // scss-docs-end utils-font-style
727
+ // scss-docs-start utils-font-variant-numeric
728
+ "font-variant-numeric": (
729
+ property: font-variant-numeric,
730
+ class: font,
731
+ values: (
732
+ tabular-nums: tabular-nums,
733
+ )
734
+ ),
735
+ // scss-docs-end utils-font-variant-numeric
727
736
  // scss-docs-start utils-font-weight
728
737
  "font-weight": (
729
738
  property: font-weight,
@@ -809,7 +818,7 @@ $utilities: map.merge(
809
818
  values: theme-color-refs("contrast"),
810
819
  ),
811
820
  "fg-opacity": (
812
- class: fg,
821
+ class: fg-opacity,
813
822
  property: color,
814
823
  values: theme-opacity-values(--fg)
815
824
  ),
@@ -844,7 +853,7 @@ $utilities: map.merge(
844
853
  ),
845
854
  "underline-opacity": (
846
855
  property: text-decoration-color,
847
- class: underline,
856
+ class: underline-opacity,
848
857
  state: hover,
849
858
  values: theme-opacity-values(--underline-color, currentcolor)
850
859
  ),
@@ -887,8 +896,8 @@ $utilities: map.merge(
887
896
  values: theme-color-refs("bg-muted"),
888
897
  ),
889
898
  "bg-opacity": (
890
- class: bg,
891
899
  property: background-color,
900
+ class: bg-opacity,
892
901
  values: theme-opacity-values(--bg)
893
902
  ),
894
903
  // scss-docs-end utils-bg-color
@@ -29,7 +29,6 @@
29
29
  @forward "chip";
30
30
  @forward "card";
31
31
  @forward "carousel";
32
- @forward "datepicker";
33
32
  @forward "dialog";
34
33
  @forward "menu";
35
34
  @forward "list-group";
File without changes
@@ -385,7 +385,7 @@ $btn-variant-selectors: (string.unquote(".btn"), string.unquote(".btn-link"), st
385
385
  .btn-check {
386
386
  > input {
387
387
  position: absolute;
388
- clip: rect(0, 0, 0, 0);
388
+ clip-path: inset(50%);
389
389
  pointer-events: none;
390
390
  }
391
391
 
@@ -404,14 +404,18 @@ $btn-variant-selectors: (string.unquote(".btn"), string.unquote(".btn-link"), st
404
404
  }
405
405
 
406
406
  &:has(input:disabled) {
407
- color: var(--btn-disabled-color);
408
407
  pointer-events: none;
408
+ opacity: var(--btn-disabled-opacity);
409
+ @include box-shadow(none);
410
+ }
411
+
412
+ // A disabled toggle that is checked keeps its checked colors, so the selected option stays visible.
413
+ &:has(input:disabled):not(:has(input:checked)) {
414
+ color: var(--btn-disabled-color);
409
415
  background-color: var(--btn-disabled-bg, var(--bg-1));
410
416
  // stylelint-disable-next-line scss/at-function-named-arguments
411
417
  background-image: if(sass($enable-gradients): none; else: null);
412
418
  border-color: var(--btn-disabled-border-color);
413
- opacity: var(--btn-disabled-opacity);
414
- @include box-shadow(none);
415
419
  }
416
420
  }
417
421
 
@@ -1,6 +1,7 @@
1
1
  @use "../functions" as *;
2
2
  @use "../mixins/border-radius" as *;
3
3
  @use "../mixins/focus-ring" as *;
4
+ @use "../mixins/forced-colors" as *;
4
5
  @use "../mixins/mask-icon" as *;
5
6
  @use "../mixins/tokens" as *;
6
7
 
@@ -12,10 +13,10 @@ $btn-close-tokens: defaults(
12
13
  (
13
14
  --btn-close-size: 1em,
14
15
  --btn-close-padding: .25em,
15
- --btn-close-color: inherit,
16
+ --btn-close-color: var(--fg-body),
16
17
  --btn-close-icon: #{escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/></svg>"))},
17
- --btn-close-opacity: .5,
18
- --btn-close-hover-opacity: .75,
18
+ --btn-close-opacity: .6,
19
+ --btn-close-hover-opacity: .8,
19
20
  --btn-close-focus-opacity: 1,
20
21
  --btn-close-disabled-opacity: .25,
21
22
  ),
@@ -38,8 +39,10 @@ $btn-close-tokens: defaults(
38
39
  color: var(--btn-close-color);
39
40
  background: transparent;
40
41
  border: 0; // for button elements
41
- @include border-radius(var(--radius-4));
42
+ outline: 1px solid transparent;
43
+ forced-color-adjust: auto;
42
44
  opacity: var(--btn-close-opacity);
45
+ @include border-radius(var(--radius-4));
43
46
 
44
47
  // Paint the icon on a pseudo-element so the mask does not clip the focus ring
45
48
  &::before {
@@ -49,6 +52,11 @@ $btn-close-tokens: defaults(
49
52
  content: "";
50
53
  background-color: currentcolor;
51
54
  @include mask-icon(var(--btn-close-icon));
55
+
56
+ // Forced colors mode removes the background color that paints the icon.
57
+ @include forced-colors() {
58
+ background-color: CanvasText;
59
+ }
52
60
  }
53
61
 
54
62
  // Override <a>'s hover style
File without changes
File without changes
File without changes
@@ -17,7 +17,7 @@
17
17
  display: inline-block;
18
18
 
19
19
  &:not(:last-child) {
20
- margin-inline-end: var(--list-inline-padding, var(--spacer) / 2);
20
+ margin-inline-end: var(--list-inline-padding, calc(var(--spacer) / 2));
21
21
  }
22
22
  }
23
23
  }
@@ -41,6 +41,10 @@ $prose-tokens: defaults(
41
41
  margin-block: 0;
42
42
  }
43
43
 
44
+ :where(p):not(:where(.not-prose, .not-prose *)) {
45
+ text-wrap: pretty;
46
+ }
47
+
44
48
  :where(ul, ol):not([class], :where(.not-prose, .not-prose *)) li:not(:last-child) {
45
49
  margin-bottom: calc(var(--content-gap) / 4);
46
50
  }
@@ -58,11 +62,11 @@ $prose-tokens: defaults(
58
62
  :where(h1, h2, h3, h4, h5, h6):not([class], :where(.not-prose, .not-prose *)) {
59
63
  margin-top: 0;
60
64
  margin-bottom: calc(var(--content-gap) / -2);
61
- font-weight: 500;
65
+ font-weight: var(--font-weight-medium);
62
66
  line-height: 1.25;
63
67
 
64
68
  code {
65
- font-weight: 600;
69
+ font-weight: var(--font-weight-semibold);
66
70
  color: inherit;
67
71
  }
68
72
  }
@@ -108,16 +112,16 @@ $prose-tokens: defaults(
108
112
  }
109
113
  }
110
114
 
111
- :where(img):not(:where(.not-prose, .not-prose *)) {
112
- max-width: 100%;
113
- }
114
-
115
115
  :where(blockquote):not(:where(.not-prose, .not-prose *)) {
116
116
  padding-inline-start: calc(var(--content-gap) / 2);
117
117
  margin: 0;
118
118
  border-inline-start: 4px solid var(--border-color);
119
119
  }
120
120
 
121
+ :where(blockquote, details):not(:where(.not-prose, .not-prose *)) > :not(:first-child, :where(.not-prose, .not-prose *)) {
122
+ margin-block-start: calc(var(--content-gap) / 2);
123
+ }
124
+
121
125
  :where(table):not(:where(.not-prose, .not-prose *)) {
122
126
  width: 100%;
123
127
  border-spacing: 0;
@@ -134,11 +138,16 @@ $prose-tokens: defaults(
134
138
  }
135
139
 
136
140
  :where(dt):not(:where(.not-prose, .not-prose *)) {
137
- font-weight: 500;
141
+ font-weight: var(--font-weight-medium);
138
142
  }
139
143
 
140
144
  :where(video, img):not(:where(.not-prose, .not-prose *)) {
141
145
  max-width: 100%;
146
+ height: auto; // Keep the aspect ratio reserved by `width` and `height` attributes
147
+ }
148
+
149
+ > :where(video, img):not(:where(.not-prose)) {
150
+ align-self: flex-start; // Do not stretch across the flex column
142
151
  }
143
152
  }
144
153
  }
@@ -38,7 +38,7 @@ $reboot-kbd-tokens: defaults(
38
38
  (
39
39
  --kbd-padding-y: .125rem,
40
40
  --kbd-padding-x: var(--spacer-1),
41
- --kbd-font-size: var(--font-size-xs),
41
+ --kbd-font-size: .75em,
42
42
  --kbd-color: var(--bg-body),
43
43
  --kbd-bg: var(--fg-2),
44
44
  --kbd-border-radius: var(--radius-3),
@@ -338,7 +338,7 @@ $reboot-mark-tokens: defaults(
338
338
  kbd,
339
339
  samp {
340
340
  font-family: var(--font-mono);
341
- font-size: 1em; // Correct the odd `em` font sizing in all browsers.
341
+ font-size: .875em; // Correct the odd `em` font sizing in all browsers.
342
342
  }
343
343
 
344
344
  // 1. Remove browser default top margin
@@ -475,6 +475,15 @@ $reboot-mark-tokens: defaults(
475
475
  line-height: inherit;
476
476
  }
477
477
 
478
+ input:is([type="date"], [type="datetime-local"], [type="month"], [type="week"], [type="time"]) {
479
+ position: relative;
480
+
481
+ &::-webkit-calendar-picker-indicator {
482
+ position: absolute;
483
+ inset-inline-end: var(--control-padding-x, .75rem);
484
+ }
485
+ }
486
+
478
487
  // Set the cursor for non-`<button>` buttons
479
488
  //
480
489
  // Details at https://github.com/twbs/bootstrap/pull/30562
@@ -575,6 +584,11 @@ $reboot-mark-tokens: defaults(
575
584
  padding: 0;
576
585
  }
577
586
 
587
+ // iOS WebKit centres date/time values; keep them under the floating label
588
+ ::-webkit-date-and-time-value {
589
+ text-align: start;
590
+ }
591
+
578
592
  ::-webkit-inner-spin-button,
579
593
  ::-webkit-outer-spin-button {
580
594
  height: auto;
@@ -23,13 +23,10 @@ $table-tokens: defaults(
23
23
  --table-group-separator-color: currentcolor,
24
24
  --table-striped-color: var(--table-color),
25
25
  --table-striped-bg-factor: 5%,
26
- --table-striped-bg: color-mix(in srgb, var(--table-color) var(--table-striped-bg-factor), transparent),
27
26
  --table-active-color: var(--table-color),
28
27
  --table-active-bg-factor: 10%,
29
- --table-active-bg: color-mix(in srgb, var(--table-color) var(--table-active-bg-factor), transparent),
30
28
  --table-hover-color: var(--table-color),
31
29
  --table-hover-bg-factor: 7.5%,
32
- --table-hover-bg: color-mix(in srgb, var(--table-color) var(--table-hover-bg-factor), transparent),
33
30
  ),
34
31
  $table-tokens
35
32
  );
@@ -241,7 +238,7 @@ $table-striped-columns-order: even !default;
241
238
  padding: 0;
242
239
  margin: -1px;
243
240
  overflow: hidden;
244
- clip: rect(0, 0, 0, 0);
241
+ clip-path: inset(50%);
245
242
  white-space: nowrap;
246
243
  border: 0;
247
244
  }
File without changes
@@ -1,5 +1,7 @@
1
1
  @use "../functions" as *;
2
+ @use "../mixins/border-radius" as *;
2
3
  @use "../mixins/focus-ring" as *;
4
+ @use "../mixins/forced-colors" as *;
3
5
  @use "../mixins/mask-icon" as *;
4
6
  @use "../mixins/tokens" as *;
5
7
  @use "../mixins/transition" as *;
@@ -15,13 +17,13 @@ $check-tokens: defaults(
15
17
  --check-margin-block: .125rem,
16
18
  --check-bg: var(--bg-body),
17
19
  --check-border-color: var(--border-color),
18
- --check-border-radius: var(--radius-5),
20
+ --check-border-radius: var(--radius-3),
19
21
  --check-icon-checked: #{escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5.5 10 3 3 6-6'/></svg>"))},
20
22
  --check-icon-indeterminate: #{escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10h8'/></svg>"))},
21
23
  --check-checked-bg: var(--control-checked-bg),
22
24
  --check-checked-border-color: var(--control-checked-border-color),
23
- --check-indeterminate-bg: var(--control-checked-bg),
24
- --check-indeterminate-border-color: var(--control-checked-border-color),
25
+ --check-indeterminate-bg: var(--check-checked-bg),
26
+ --check-indeterminate-border-color: var(--check-checked-border-color),
25
27
  --check-active-bg: var(--control-active-bg),
26
28
  --check-active-border-color: var(--control-active-border-color),
27
29
  --check-disabled-bg: var(--control-disabled-bg),
@@ -47,8 +49,7 @@ $check-tokens: defaults(
47
49
  // later: maybe set a tertiary bg color?
48
50
  background-color: var(--theme-bg, var(--check-bg));
49
51
  border: 1px solid var(--theme-bg, var(--check-border-color));
50
- // stylelint-disable-next-line property-disallowed-list
51
- border-radius: 33%;
52
+ @include border-radius(var(--check-border-radius));
52
53
  @include transition(
53
54
  background-color var(--control-transition-duration) var(--control-transition-timing),
54
55
  border-color var(--control-transition-duration) var(--control-transition-timing)
@@ -72,17 +73,27 @@ $check-tokens: defaults(
72
73
  opacity var(--control-transition-duration) var(--control-transition-timing),
73
74
  transform var(--control-transition-duration) var(--control-transition-timing)
74
75
  );
76
+
77
+ // Forced colors mode removes the background color that paints the mark.
78
+ @include forced-colors() {
79
+ background-color: CanvasText;
80
+ }
75
81
  }
76
82
 
77
- &:checked,
78
- &:indeterminate {
83
+ &:checked {
79
84
  background-color: var(--theme-bg, var(--check-checked-bg));
80
85
  border-color: var(--theme-bg, var(--check-checked-border-color));
86
+ }
81
87
 
82
- &::before {
83
- opacity: 1;
84
- transform: scale(1);
85
- }
88
+ &:indeterminate {
89
+ background-color: var(--theme-bg, var(--check-indeterminate-bg));
90
+ border-color: var(--theme-bg, var(--check-indeterminate-border-color));
91
+ }
92
+
93
+ &:checked::before,
94
+ &:indeterminate::before {
95
+ opacity: 1;
96
+ transform: scale(1);
86
97
  }
87
98
 
88
99
  &:indeterminate::before { mask-image: var(--check-icon-indeterminate); }
@@ -100,7 +111,8 @@ $check-tokens: defaults(
100
111
  cursor: default;
101
112
  }
102
113
  }
103
- &:disabled:checked {
114
+ &:disabled:checked,
115
+ &:disabled:indeterminate {
104
116
  opacity: var(--check-disabled-opacity);
105
117
  }
106
118
  }
@@ -114,7 +126,6 @@ $check-tokens: defaults(
114
126
  }
115
127
  .check-lg {
116
128
  --check-size: 1.5rem;
117
- --check-margin-block: .375rem;
118
129
 
119
130
  + label {
120
131
  font-size: var(--font-size-lg);