@wwtdev/bsds-css 1.0.2 → 1.2.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.
@@ -0,0 +1,158 @@
1
+ @mixin tooltip() {
2
+ /* -------------------- BASE STYLES -------------------- */
3
+ .bs-tooltip {
4
+ display: inline-block;
5
+ position: relative;
6
+ }
7
+
8
+ .bs-tooltip :where(.bs-tooltip-text) {
9
+ align-items: center;
10
+ background-color: var(--bs-bg-base);
11
+ border-radius: 4px;
12
+ box-shadow: var(--bs-shadow-contentLowCenter);
13
+ color: var(--bs-violet-400);
14
+ display: flex;
15
+ font-size: var(--bs-text-sm);
16
+ justify-content: center;
17
+ max-width: 16rem;
18
+ min-width: 4rem;
19
+ opacity: 0;
20
+ padding-bottom: 0.25rem;
21
+ padding-left: 0.5rem;
22
+ padding-right: 0.5rem;
23
+ padding-top: 0.25rem;
24
+ position: absolute;
25
+ transform: scale(0);
26
+ transition-duration: 75ms;
27
+ transition-property: opacity, transform;
28
+ transition-timing-function: ease-in-out;
29
+ width: max-content;
30
+ z-index: 999;
31
+ }
32
+
33
+ /* -------------------- POSITION: UNDEFINED / TOP -------------------- */
34
+ .bs-tooltip:where(:not([data-position])) :where(.bs-tooltip-text),
35
+ .bs-tooltip:where([data-position="top"]) :where(.bs-tooltip-text) {
36
+ bottom: calc(100% + 0.5rem);
37
+ left: 50%;
38
+ transform-origin: bottom center;
39
+ transform: translateX(-50%) scale(0);
40
+ }
41
+
42
+ /* Active States */
43
+ :where(.bs-tooltip:not([data-position])):hover :where(.bs-tooltip-text),
44
+ :where(.bs-tooltip[data-position="top"]):hover :where(.bs-tooltip-text),
45
+ :where(.bs-tooltip:not([data-position])):focus-within :where(.bs-tooltip-text),
46
+ :where(.bs-tooltip[data-position="top"]):focus-within :where(.bs-tooltip-text),
47
+ :where(.bs-tooltip:not([data-position]))[data-shown] :where(.bs-tooltip-text),
48
+ :where(.bs-tooltip[data-position="top"])[data-shown] :where(.bs-tooltip-text) {
49
+ opacity: 1;
50
+ transform: translateX(-50%) scale(1);
51
+ }
52
+
53
+ /* -------------------- POSITION: BOTTOM -------------------- */
54
+ .bs-tooltip:where([data-position="bottom"]) :where(.bs-tooltip-text) {
55
+ left: 50%;
56
+ top: calc(100% + 0.5rem);
57
+ transform-origin: top center;
58
+ transform: translateX(-50%) scale(0);
59
+ }
60
+
61
+ /* Active States */
62
+ :where(.bs-tooltip[data-position="bottom"]):hover :where(.bs-tooltip-text),
63
+ :where(.bs-tooltip[data-position="bottom"]):focus-within :where(.bs-tooltip-text),
64
+ :where(.bs-tooltip[data-position="bottom"])[data-shown] :where(.bs-tooltip-text) {
65
+ opacity: 1;
66
+ transform: translateX(-50%) scale(1);
67
+ }
68
+
69
+ /* -------------------- POSITION: LEFT -------------------- */
70
+ .bs-tooltip:where([data-position="left"]) :where(.bs-tooltip-text) {
71
+ right: calc(100% + 0.5rem);
72
+ top: 50%;
73
+ transform-origin: center right;
74
+ transform: translateY(-50%) scale(0);
75
+ }
76
+
77
+ /* Active States */
78
+ :where(.bs-tooltip[data-position="left"]):hover :where(.bs-tooltip-text),
79
+ :where(.bs-tooltip[data-position="left"]):focus-within :where(.bs-tooltip-text),
80
+ :where(.bs-tooltip[data-position="left"])[data-shown] :where(.bs-tooltip-text) {
81
+ opacity: 1;
82
+ transform: translateY(-50%) scale(1);
83
+ }
84
+
85
+ /* -------------------- POSITION: RIGHT -------------------- */
86
+ .bs-tooltip:where([data-position="right"]) :where(.bs-tooltip-text) {
87
+ left: calc(100% + 0.5rem);
88
+ top: 50%;
89
+ transform-origin: center left;
90
+ transform: translateY(-50%) scale(0);
91
+ }
92
+
93
+ :where(.bs-tooltip[data-position="right"]):hover :where(.bs-tooltip-text),
94
+ :where(.bs-tooltip[data-position="right"]):focus-within :where(.bs-tooltip-text),
95
+ :where(.bs-tooltip[data-position="right"])[data-shown] :where(.bs-tooltip-text) {
96
+ opacity: 1;
97
+ transform: translateY(-50%) scale(1);
98
+ }
99
+
100
+ /* -------------------- POSITION: CORNERS -------------------- */
101
+ /* top-left */
102
+ .bs-tooltip:where([data-position="top-left"]) :where(.bs-tooltip-text) {
103
+ bottom: calc(100% + 0.5rem);
104
+ right: calc(100% + 0.5rem);
105
+ transform-origin: bottom right;
106
+ }
107
+
108
+ /* top-right */
109
+ .bs-tooltip:where([data-position="top-right"]) :where(.bs-tooltip-text) {
110
+ bottom: calc(100% + 0.5rem);
111
+ left: calc(100% + 0.5rem);
112
+ transform-origin: bottom left;
113
+ }
114
+
115
+ /* bottom-left */
116
+ .bs-tooltip:where([data-position="bottom-left"]) :where(.bs-tooltip-text) {
117
+ right: calc(100% + 0.5rem);
118
+ top: calc(100% + 0.5rem);
119
+ transform-origin: top right;
120
+ }
121
+
122
+ /* bottom-right */
123
+ .bs-tooltip:where([data-position="bottom-right"]) :where(.bs-tooltip-text) {
124
+ left: calc(100% + 0.5rem);
125
+ top: calc(100% + 0.5rem);
126
+ transform-origin: top left;
127
+ }
128
+
129
+ /* Active States */
130
+ :where(.bs-tooltip[data-position="top-left"]):hover :where(.bs-tooltip-text),
131
+ :where(.bs-tooltip[data-position="top-right"]):hover :where(.bs-tooltip-text),
132
+ :where(.bs-tooltip[data-position="bottom-left"]):hover :where(.bs-tooltip-text),
133
+ :where(.bs-tooltip[data-position="bottom-right"]):hover :where(.bs-tooltip-text),
134
+ :where(.bs-tooltip[data-position="top-left"]):focus-within :where(.bs-tooltip-text),
135
+ :where(.bs-tooltip[data-position="top-right"]):focus-within :where(.bs-tooltip-text),
136
+ :where(.bs-tooltip[data-position="bottom-left"]):focus-within :where(.bs-tooltip-text),
137
+ :where(.bs-tooltip[data-position="bottom-right"]):focus-within :where(.bs-tooltip-text),
138
+ :where(.bs-tooltip[data-position="top-left"])[data-shown] :where(.bs-tooltip-text),
139
+ :where(.bs-tooltip[data-position="top-right"])[data-shown] :where(.bs-tooltip-text),
140
+ :where(.bs-tooltip[data-position="bottom-left"])[data-shown] :where(.bs-tooltip-text),
141
+ :where(.bs-tooltip[data-position="bottom-right"])[data-shown] :where(.bs-tooltip-text) {
142
+ opacity: 1;
143
+ transform: scale(1);
144
+ }
145
+
146
+ /* -------------------- DISABLED -------------------- */
147
+ /*
148
+ Don't display unless data-shown is present
149
+ This must go last to properly override the other classes
150
+ */
151
+ :where(.bs-tooltip[data-disabled]:not([data-shown])):hover :where(.bs-tooltip-text),
152
+ :where(.bs-tooltip[data-disabled]:not([data-shown])):focus-within :where(.bs-tooltip-text) {
153
+ opacity: 0;
154
+ transform: scale(0);
155
+ }
156
+
157
+ }
158
+
@@ -0,0 +1,107 @@
1
+ .bs-accordion {
2
+ --accordion-link-color: var(--bs-purple-400);
3
+ --accordion-link-outline-color: var(--bs-blue-400);
4
+ --accordion-outline-color: transparent;
5
+ --accordion-padding-inline: 0;
6
+ --accordion-text-size: var(--bs-text-sm);
7
+ border-block: 1px solid var(--bs-border);
8
+ display: block;
9
+ }
10
+
11
+ @media (min-width: 957px) {
12
+ .bs-accordion {
13
+ --accordion-padding-inline: var(--bs-space-2);
14
+ --accordion-text-size: var(--bs-text-base);
15
+ }
16
+ }
17
+
18
+ /* Accordion Panel (Icon, Title, Caret) */
19
+
20
+ .bs-accordion :where(header button) {
21
+ align-items: center;
22
+ background-color: var(--bs-bg-base);
23
+ border: 0px solid transparent;
24
+ border-radius: .25rem;
25
+ color: var(--bs-ink-base);
26
+ cursor: pointer;
27
+ display: grid;
28
+ font-size: var(--accordion-text-size);
29
+ font-weight: var(--bs-font-normal);
30
+ grid-template-columns: minmax(0px, auto) minmax(0px, 1fr) minmax(0px, auto);
31
+ grid-template-areas: "start main end";
32
+ line-height: 1.5;
33
+ outline: 2px solid var(--accordion-outline-color);
34
+ padding-block: var(--bs-space-f-2);
35
+ padding-inline: var(--accordion-padding-inline);
36
+ width: 100%;
37
+ }
38
+
39
+ .bs-accordion :where(header button:focus-visible) {
40
+ --accordion-outline-color: var(--bs-blue-400);
41
+ }
42
+
43
+ .bs-accordion :where(header button) > * {
44
+ font-size: inherit;
45
+ font-weight: inherit;
46
+ line-height: inherit;
47
+ }
48
+
49
+ .bs-accordion :where(header button) :where([data-position]) {
50
+ width: var(--accordion-text-size);
51
+ }
52
+
53
+ .bs-accordion :where(header button) > :where([data-position="start"]) {
54
+ grid-area: start;
55
+ margin-right: var(--bs-space-2);
56
+ }
57
+
58
+ .bs-accordion :where(header button) > :where([data-position="end"]) {
59
+ grid-area: end;
60
+ transform: rotate(0);
61
+ transition: transform 250ms ease-out;
62
+ }
63
+
64
+ .bs-accordion :where(header[data-open]:not([data-open="false"])) :where([data-position="end"]) {
65
+ transform: rotate(180deg);
66
+ }
67
+
68
+ .bs-accordion :where(header button) > :where(h2, h3, h4, h5) {
69
+ grid-area: main;
70
+ margin-right: var(--bs-space-2);
71
+ text-align: left;
72
+ }
73
+
74
+ .bs-accordion :where(header button) > :where(h2, h3, h4, h5) :where(*) {
75
+ vertical-align: middle;
76
+ }
77
+
78
+ @media (min-width: 957px) {
79
+ .bs-accordion :where(header button) > :where(h2, h3, h4, h5) {
80
+ margin-right: var(--bs-space-3);
81
+ }
82
+ }
83
+
84
+ /* Accordion Content (the collapsible / expandible part) */
85
+
86
+ .bs-accordion :where(.bs-accordion-content) {
87
+ display: grid;
88
+ font-size: var(--accordion-text-size);
89
+ grid-template-rows: 0fr;
90
+ overflow: hidden;
91
+ padding-inline: var(--accordion-padding-inline);
92
+ transition: grid-template-rows 250ms ease-out;
93
+ }
94
+
95
+ .bs-accordion :where(.bs-accordion-content) > :where(:first-child) {
96
+ overflow: hidden;
97
+ }
98
+
99
+ .bs-accordion :where(.bs-accordion-content[data-open]:not([data-open="false"])) {
100
+ grid-template-rows: 1fr;
101
+ padding-block-end: var(--bs-space-f-2);
102
+ }
103
+
104
+ /* Accordion Group */
105
+ :where(.bs-accordion[data-stacked]) + .bs-accordion:where([data-stacked]) {
106
+ border-block-start-color: transparent;
107
+ }
@@ -0,0 +1,62 @@
1
+ .bs-banner {
2
+ background-color: var(--bs-bg-invert-subtle);
3
+ color: var(--bs-gray-100);
4
+ display: flex;
5
+ justify-content: center;
6
+ padding-bottom: 1rem;
7
+ padding-left: 1.25rem;
8
+ padding-right: 1.25rem;
9
+ padding-top: 1rem;
10
+ }
11
+
12
+ .bs-banner:where([data-dismissed]) {
13
+ display: none;
14
+ }
15
+
16
+ :where(.dark) .bs-banner {
17
+ color: var(--bs-black);
18
+ }
19
+
20
+ .bs-banner :where(.bs-banner-content) {
21
+ align-items: center;
22
+ display: flex;
23
+ /* Content locks at globally configured width */
24
+ max-width: var(--bs-content-max-width);
25
+ width: 100%;
26
+ }
27
+
28
+ .bs-banner :where(.bs-banner-content .bs-banner-warning-icon) {
29
+ /* Do not display warning icon on smaller screens */
30
+ display: none;
31
+ margin-right: 0.625rem;
32
+ }
33
+
34
+ .bs-banner :where(.bs-banner-content p) {
35
+ flex-grow: 1;
36
+ padding-right: 1.25rem;
37
+ }
38
+
39
+ .bs-banner :where(.bs-banner-content p a) {
40
+ color: var(--bs-pink-200);
41
+ text-decoration: none;
42
+ }
43
+
44
+ :where(.dark) .bs-banner :where(.bs-banner-content p a) {
45
+ color: var(--bs-pink-500);
46
+ }
47
+
48
+ .bs-banner :where(.bs-banner-content p a:hover) {
49
+ text-decoration: underline;
50
+ }
51
+
52
+ .bs-banner :where(.bs-banner-content button) {
53
+ background-color: inherit;
54
+ color: inherit;
55
+ cursor: pointer;
56
+ }
57
+
58
+ @media (min-width: 957px) {
59
+ .bs-banner :where(.bs-banner-content .bs-banner-warning-icon) {
60
+ display: inline-flex;
61
+ }
62
+ }
@@ -4,7 +4,6 @@
4
4
  align-items: center;
5
5
  font-size: var(--bs-text-base);
6
6
  font-weight: 400;
7
- gap: 0.5em;
8
7
  line-height: 115%;
9
8
  }
10
9
 
@@ -20,6 +19,15 @@
20
19
  width: auto;
21
20
  }
22
21
 
22
+ /* not using gap on .bs-boolean due to dead click zone */
23
+ .bs-boolean label {
24
+ padding-inline-end: 0.5em;
25
+ }
26
+
27
+ .bs-boolean input + label {
28
+ padding-inline: 0.5em 0;
29
+ }
30
+
23
31
  .bs-boolean:where([data-size='sm']),
24
32
  .bs-boolean:where([data-size='sm']) label {
25
33
  font-size: var(--bs-text-xs);
@@ -28,7 +36,7 @@
28
36
 
29
37
  /* Checkbox & Radio Input */
30
38
 
31
- :where(input[type^='checkbox'], input[type^='radio']) {
39
+ :where(input[type='checkbox'], input[type='radio']) {
32
40
  --box-shadow: var(--bs-ink-base);
33
41
 
34
42
  appearance: none;
@@ -42,20 +50,22 @@
42
50
  width: 1rem;
43
51
  }
44
52
 
45
- :where(input[type^='checkbox'], input[type^='radio']):focus {
53
+ :where(input[type='checkbox'], input[type='radio']):focus-visible {
46
54
  box-shadow: inset 0 0 0 0.125rem var(--box-shadow),
47
55
  0 0 0 2px var(--offset-color, var(--bs-bg-base)),
48
56
  0 0 0 4px var(--outline-color, var(--bs-blue-400));
57
+ outline: 2px solid transparent;
49
58
  }
50
59
 
51
- :where(input[type^='checkbox']) {
60
+ :where(input[type='checkbox']) {
52
61
  border-radius: 0.125rem;
53
62
  }
54
63
 
55
- :where(input[type^='radio']) {
64
+ :where(input[type='radio']) {
56
65
  border-radius: 50%;
57
66
  }
58
67
 
68
+ /* Checkbox's checkmark */
59
69
  input:where([type='checkbox'])::before {
60
70
  --filled-size: 1rem;
61
71
  --check-fill-color: var(--bs-blue-400);
@@ -68,7 +78,7 @@ input:where([type='checkbox'])::before {
68
78
  width: var(--filled-size);
69
79
  }
70
80
 
71
- input:where([type^='checkbox'])::after {
81
+ input:where([type='checkbox'])::after {
72
82
  border: solid var(--bs-white);
73
83
  border-width: 0 0.125rem 0.125rem 0;
74
84
  content: '';
@@ -82,6 +92,15 @@ input:where([type^='checkbox'])::after {
82
92
  width: 0.375em;
83
93
  }
84
94
 
95
+ input:where([type='checkbox']):where(:indeterminate)::after {
96
+ border: none;
97
+ background-color: var(--bs-white);
98
+ height: 0.125rem;
99
+ transform: translate(-50%, -0.0625rem) rotate(0deg);
100
+ width: 0.625em;
101
+ }
102
+
103
+ /* Radio's dot */
85
104
  input:where([type='radio'])::before {
86
105
  --filled-size: 1rem;
87
106
  --radio-fill-color: var(--bs-blue-400);
@@ -112,8 +131,8 @@ input:where([type='radio'])::after {
112
131
  width: var(--inner-size);
113
132
  }
114
133
 
115
- input:where([type='checkbox']:checked, [type='radio']:checked)::before,
116
- input:where([type='checkbox']:checked, [type='radio']:checked)::after {
134
+ input:where([type='checkbox']:checked, [type='checkbox']:indeterminate, [type='radio']:checked)::before,
135
+ input:where([type='checkbox']:checked, [type='checkbox']:indeterminate, [type='radio']:checked)::after {
117
136
  visibility: visible;
118
137
  }
119
138
 
@@ -126,6 +145,11 @@ input:where([type='checkbox']:checked, [type='radio']:checked)::after {
126
145
  width: 0.3125rem;
127
146
  }
128
147
 
148
+ .bs-boolean:where([data-size='sm']) input[type='checkbox']:where(:indeterminate)::after {
149
+ height: 0.125rem;
150
+ width: .75em;
151
+ }
152
+
129
153
  .bs-boolean:where([data-size='sm']) input[type='radio']::after {
130
154
  --inner-size: 0.25rem;
131
155
  }
@@ -138,7 +162,8 @@ input:where([type='checkbox'], [type='radio']):disabled {
138
162
  background-color: transparent;
139
163
  }
140
164
 
141
- input:where([type='checkbox']):checked:disabled::before {
165
+ input:where([type='checkbox']):checked:disabled::before,
166
+ input:where([type='checkbox']):indeterminate:disabled::before {
142
167
  --check-fill-color: var(--bs-gray-400);
143
168
  }
144
169
 
@@ -149,6 +174,6 @@ input:where([type='radio']):checked:disabled::before {
149
174
 
150
175
  /* Error state */
151
176
 
152
- input:where([type^='checkbox'], [type^='radio'])[data-error] {
177
+ input:where([type='checkbox'], [type='radio'])[data-error] {
153
178
  --box-shadow: var(--bs-red-400);
154
179
  }
@@ -1,18 +1,19 @@
1
1
  :where([data-required]) {
2
- color: var(--bs-red-400);
2
+ color: var(--bs-red-500);
3
+ font-weight: var(--bs-font-bold, 600);
3
4
  }
4
5
 
5
6
  :where([data-disabled], [data-disabled] [data-required]) {
6
7
  color: var(--bs-gray-400);
7
8
  }
8
9
 
9
- :where(label + input, label > input):not([type^='checkbox'], [type^='radio']),
10
+ :where(label + input, label > input):where(:not([type='checkbox'], [type='radio'])),
10
11
  :where(label + textarea, label > textarea),
11
12
  :where(label + select, label > select) {
12
13
  margin-top: 0.25rem;
13
14
  }
14
15
 
15
- input:not([type^='checkbox'], [type^='radio'], [type^='file'], [type^='range']),
16
+ input:where(:not([type='checkbox'], [type='radio'], [type='file'], [type='range'])),
16
17
  textarea, select {
17
18
  appearance: none;
18
19
  background-color: var(--input-bg, var(--bs-bg-base));
@@ -21,27 +22,35 @@ textarea, select {
21
22
  color: var(--bs-ink-base);
22
23
  font-size: var(--bs-text-base);
23
24
  font-weight: 400;
25
+ height: 2.5rem;
24
26
  line-height: var(--bs-leading-base);
25
- min-height: 40px;
26
- padding: 0.5rem 0.75rem;
27
+ min-height: 2.5rem;
28
+ padding-inline: 0.75rem;
27
29
  width: 100%;
28
30
  }
29
31
 
32
+ textarea {
33
+ height: auto;
34
+ padding-block: 0.5rem;
35
+ resize: vertical;
36
+ }
37
+
30
38
  /* Generally applicable (all input types) */
31
39
  :is(input, textarea, select)::placeholder {
32
40
  color: var(--bs-violet-200);
33
41
  opacity: 1;
34
42
  }
35
43
 
36
- :is(input, textarea, select):focus {
44
+
45
+ :is(input:where(:not([type='checkbox'], [type='radio']), textarea, select):where(:focus)) {
37
46
  box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
38
47
  0 0 0 4px var(--outline-color, var(--bs-blue-400));
39
48
  outline: 2px solid transparent;
40
49
  }
41
- :where(.box) :is(input, textarea, select):focus {
50
+ :where(.box) :is(input, textarea, select):where(:focus) {
42
51
  --offset-color: var(--bs-bg-subtle);
43
52
  }
44
- :where(.box[data-invert]) :is(input, textarea, select):focus {
53
+ :where(.box[data-invert]) :is(input, textarea, select):where(:focus) {
45
54
  --offset-color: var(--bs-bg-invert);
46
55
  }
47
56
 
@@ -49,7 +58,7 @@ textarea, select {
49
58
  --outline-color: var(--bs-red-200);
50
59
  }
51
60
 
52
- :is(input, textarea, select):disabled {
61
+ :is(input:where(:not([type='checkbox'],[type='radio'])), textarea, select):where(:disabled) {
53
62
  background-color: var(--bs-gray-200);
54
63
  border-color: var(--bs-gray-400);
55
64
  color: var(--bs-gray-400);
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  :where([data-required]) {
13
- color: var(--bs-red-400);
13
+ color: var(--bs-red-500);
14
14
  }
15
15
 
16
16
  :where(label[data-disabled], [data-disabled] [data-required], [data-disabled] label) {
@@ -20,10 +20,6 @@
20
20
  --inner-text-padding: 0.375rem;
21
21
  }
22
22
 
23
- :where(.dark) .bs-switch:where(:not([data-disabled])) {
24
- --switch-background: var(--bs-blue-400);
25
- }
26
-
27
23
  .bs-switch input,
28
24
  .bs-switch:where([data-size="sm"]) input {
29
25
  cursor: pointer;
@@ -47,6 +43,11 @@
47
43
  height: calc(var(--ball-diameter) + var(--offset) * 2);
48
44
  }
49
45
 
46
+ .bs-switch input:where(:checked) ~ span,
47
+ .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span {
48
+ --switch-background: var(--bs-blue-400);
49
+ }
50
+
50
51
  /* Toggle "ball" */
51
52
  .bs-switch span::before {
52
53
  background-color: var(--ball-background);
@@ -68,7 +69,6 @@
68
69
  transform: translate(var(--ball-diameter), -50%);
69
70
  }
70
71
 
71
-
72
72
  .bs-switch input:where(:checked) ~ span:where([data-inner-on-label][data-inner-off-label])::before,
73
73
  .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span:where([data-inner-on-label][data-inner-off-label])::before {
74
74
  transform: translate(calc(var(--ball-diameter) + var(--inner-text-width)), -50%);
@@ -109,15 +109,15 @@
109
109
 
110
110
  /* Focus state */
111
111
 
112
- .bs-switch:where(:focus-within) span {
112
+ .bs-switch :where(input:focus-visible) + span {
113
113
  box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
114
114
  0 0 0 4px var(--outline-color, var(--bs-blue-400));
115
115
  outline: 2px solid transparent;
116
116
  }
117
- :where(.box) .bs-switch:where(:focus-within) span {
117
+ :where(.box) .bs-switch :where(input:focus-visible) + span {
118
118
  --offset-color: var(--bs-bg-subtle);
119
119
  }
120
- :where(.box[data-invert]) .bs-switch:where(:focus-within) span {
120
+ :where(.box[data-invert]) .bs-switch :where(input:focus-visible) + span {
121
121
  --offset-color: var(--bs-bg-invert);
122
122
  }
123
123