@wwtdev/bsds-css 1.2.0 → 1.3.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.
@@ -66,18 +66,18 @@
66
66
  transform: rotate(180deg);
67
67
  }
68
68
 
69
- .bs-accordion :where(header button) > :where(h2, h3, h4, h5) {
69
+ .bs-accordion :where(header button) > :where(span) {
70
70
  grid-area: main;
71
71
  margin-right: var(--bs-space-2);
72
72
  text-align: left;
73
73
  }
74
74
 
75
- .bs-accordion :where(header button) > :where(h2, h3, h4, h5) :where(*) {
75
+ .bs-accordion :where(header button) > :where(span) {
76
76
  vertical-align: middle;
77
77
  }
78
78
 
79
79
  @media (min-width: 957px) {
80
- .bs-accordion :where(header button) > :where(h2, h3, h4, h5) {
80
+ .bs-accordion :where(header button) > :where(span) {
81
81
  margin-right: var(--bs-space-3);
82
82
  }
83
83
  }
@@ -0,0 +1,193 @@
1
+ @mixin dropdown() {
2
+ /* Positioning the parent */
3
+ .bs-dropdown {
4
+ display: inline-block;
5
+ position: relative;
6
+ }
7
+
8
+ /* Option list */
9
+ .bs-dropdown :where(ul) {
10
+ background-color: var(--bs-white);
11
+ border-radius: 4px;
12
+ bottom: auto;
13
+ box-shadow: var(--bs-shadow-contentMedium);
14
+ line-height: 1.5rem;
15
+ list-style: none;
16
+ margin: 0;
17
+ max-height: 0;
18
+ max-width: 16.875rem;
19
+ opacity: 0;
20
+ overflow-y: auto;
21
+ padding: 0;
22
+ position: absolute;
23
+ top: calc(100% + 0.5rem);
24
+ transition-duration: 75ms;
25
+ transition-property: opacity, max-height;
26
+ transition-timing-function: ease-in-out;
27
+ z-index: 999;
28
+ }
29
+
30
+ /* (not) data-variant="fit" */
31
+ .bs-dropdown:not([data-variant="fit"]) :where(ul) {
32
+ width: 16.875rem;
33
+ }
34
+
35
+ /* data-shown */
36
+ .bs-dropdown:where([data-shown]) :where(ul) {
37
+ max-height: 20rem;
38
+ opacity: 1;
39
+ padding-top: 0.75rem;
40
+ }
41
+
42
+ /* data-position="top" */
43
+ .bs-dropdown:where([data-position="top"]) :where(ul) {
44
+ bottom: calc(100% + 0.5rem);
45
+ top: auto;
46
+ }
47
+
48
+ /* data-justify="center" */
49
+ .bs-dropdown:where([data-justify="center"]) :where(ul) {
50
+ left: 50%;
51
+ transform: translateX(-50%);
52
+ }
53
+
54
+ /* Option list item */
55
+ .bs-dropdown :where(ul li) {
56
+ align-items: center;
57
+ border-bottom: 2px solid transparent;
58
+ border-left: 4px solid transparent;
59
+ border-radius: 3px;
60
+ border-right: 2px solid transparent;
61
+ border-top: 2px solid transparent;
62
+ color: var(--bs-ink-base);
63
+ column-gap: 0.5rem;
64
+ cursor: pointer;
65
+ display: grid;
66
+ margin-bottom: 0.5rem;
67
+ padding-bottom: 0.25rem;
68
+ padding-left: 0.5rem;
69
+ padding-right: 0.75rem;
70
+ padding-top: 0.25rem;
71
+ row-gap: 0.125rem;
72
+ }
73
+
74
+ /* data-variant="search" (search input) */
75
+ .bs-dropdown :where(ul li[data-variant~="search"]) {
76
+ border-left: none;
77
+ cursor: default;
78
+ display: block;
79
+ }
80
+
81
+ /* data-variant="break" (list item) */
82
+ .bs-dropdown :where(ul li[data-variant~="break"]) {
83
+ border-left: none;
84
+ cursor: default;
85
+ display: block;
86
+ padding: 0;
87
+ }
88
+
89
+ /* data-variant="break" (actual line break) */
90
+ .bs-dropdown :where(ul li[data-variant~="break"] hr) {
91
+ background: var(--bs-navy-200);
92
+ }
93
+
94
+ /* data-variant="2-col" */
95
+ .bs-dropdown :where(ul li[data-variant~="2-col"]) {
96
+ grid-template-columns: min-content 1fr;
97
+ }
98
+
99
+ /* data-variant="description" */
100
+ /* Description will be the 2nd child in a 1-column item */
101
+ .bs-dropdown :where(ul li:not([data-variant~="2-col"])[data-variant~="description"] :nth-child(2)) {
102
+ color: var(--bs-ink-light);
103
+ font-size: var(--bs-text-xs);
104
+ height: 1.125rem;
105
+ line-height: 1.125rem;
106
+ }
107
+
108
+ /* data-variant="2-col description" */
109
+ /* Description will be the 3rd child in a 2-column item */
110
+ .bs-dropdown :where(ul li[data-variant~="2-col"][data-variant~="description"] :nth-child(3)) {
111
+ color: var(--bs-ink-light);
112
+ font-size: var(--bs-text-xs);
113
+ grid-column-start: 2;
114
+ height: 1.125rem;
115
+ line-height: 1.125rem;
116
+ }
117
+
118
+ /* List item hover or data-selected */
119
+ .bs-dropdown :where(ul li:hover),
120
+ .bs-dropdown :where(ul li[data-selected]) {
121
+ background-color: var(--bs-bg-subtle);
122
+ border-left: 4px solid var(--bs-blue-400);
123
+ color: var(--bs-blue-400);
124
+ outline: none;
125
+ }
126
+
127
+ /* data-variant="search" or data-variant="break" hover */
128
+ .bs-dropdown :where(ul li[data-variant~="search"]:hover),
129
+ .bs-dropdown :where(ul li[data-variant~="break"]:hover) {
130
+ background-color: transparent;
131
+ border-left: none;
132
+ color: var(--bs-ink-base);
133
+ }
134
+
135
+ /* data-variant="negative" hover, data-selected, and both */
136
+ .bs-dropdown :where(ul li[data-variant~="negative"]:hover),
137
+ .bs-dropdown :where(ul li[data-variant~="negative"][data-selected]),
138
+ .bs-dropdown :where(ul li[data-variant~="negative"][data-selected]:hover) {
139
+ /* 25% alpha version of --bs-red-400 */
140
+ background-color: rgba(248, 169, 170, 0.25);
141
+ border-left: 4px solid var(--bs-red-500);
142
+ color: var(--bs-red-500);
143
+ }
144
+
145
+ /* data-variant="description" or data-variant="2-col description" hover or data-selected */
146
+ .bs-dropdown :where(ul li:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
147
+ .bs-dropdown :where(ul li[data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
148
+ .bs-dropdown :where(ul li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
149
+ .bs-dropdown :where(ul li[data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
150
+ color: var(--bs-blue-400);
151
+ }
152
+
153
+ /* data-variant="negative description" or data-variant="2-col negative description" hover or data-selected */
154
+ .bs-dropdown :where(ul li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
155
+ .bs-dropdown :where(ul li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
156
+ .bs-dropdown :where(ul li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
157
+ .bs-dropdown :where(ul li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
158
+ color: var(--bs-red-500);
159
+ }
160
+
161
+ /* List option mouse click focus (do not show) */
162
+ .bs-dropdown :where(ul li:focus:not(:focus-visible)){
163
+ outline: none;
164
+ }
165
+
166
+ /* data-variant="negative" list option mouse click focus (do not show) */
167
+ li[data-variant~="negative"]:focus:not(:focus-visible) {
168
+ outline: none;
169
+ }
170
+
171
+ /* List option keyboard navigation focus */
172
+ .bs-dropdown :where(ul li:focus-visible) {
173
+ --focus-border-color: var(--bs-blue-400);
174
+ border: 2px solid var(--focus-border-color);
175
+ outline: none;
176
+ padding-left: 0.625rem;
177
+ }
178
+
179
+ /* Navigation focus on a selected element should preserve 4px left border */
180
+ .bs-dropdown :where(ul li[data-selected]:focus-visible) {
181
+ border-left: 4px solid var(--focus-border-color);
182
+ padding-left: 0.5rem;
183
+ }
184
+
185
+ /* data-variant="negative" list option keyboard navigation focus */
186
+ .bs-dropdown :where(ul li[data-variant~="negative"]:focus-visible) {
187
+ --focus-border-color: var(--bs-red-200);
188
+ }
189
+
190
+
191
+
192
+ }
193
+
@@ -43,6 +43,7 @@
43
43
  appearance: none;
44
44
  background-color: var(--bg-base);
45
45
  box-shadow: inset 0 0 0 0.125rem var(--box-shadow);
46
+ cursor: pointer;
46
47
  display: grid;
47
48
  height: 1rem;
48
49
  margin: 0;
@@ -161,6 +162,7 @@ input:where([type='checkbox']:checked, [type='checkbox']:indeterminate, [type='r
161
162
  input:where([type='checkbox'], [type='radio']):disabled {
162
163
  --box-shadow: var(--bs-gray-400);
163
164
  background-color: transparent;
165
+ cursor: default;
164
166
  }
165
167
 
166
168
  input:where([type='checkbox']):checked:disabled::before,
@@ -176,7 +178,8 @@ input:where([type='radio']):checked:disabled::before {
176
178
  /* Error state */
177
179
 
178
180
  input:where([type='checkbox'], [type='radio'])[data-error] {
179
- --box-shadow: var(--bs-red-400);
181
+ --box-shadow: var(--bs-red-500);
182
+ --outline-color: var(--bs-red-200);
180
183
  }
181
184
 
182
185
  }
@@ -1,5 +1,6 @@
1
1
  @mixin form-elements() {
2
- :where([data-required]) {
2
+ /* Generally applicable (all input types) */
3
+ :where([data-required]) {
3
4
  color: var(--bs-red-500);
4
5
  font-weight: var(--bs-font-bold, 600);
5
6
  }
@@ -8,106 +9,16 @@
8
9
  color: var(--bs-gray-400);
9
10
  }
10
11
 
11
- :where(label + input, label > input):where(:not([type='checkbox'], [type='radio'])),
12
- :where(label + textarea, label > textarea),
13
- :where(label + select, label > select) {
14
- margin-top: 0.25rem;
15
- }
16
-
17
- input:where(:not([type='checkbox'], [type='radio'], [type='file'], [type='range'])),
18
- textarea, select {
19
- appearance: none;
20
- background-color: var(--input-bg, var(--bs-bg-base));
21
- border: 1px solid var(--input-border, var(--bs-violet-300));
22
- border-radius: 0.25rem;
23
- color: var(--bs-ink-base);
24
- font-size: var(--bs-text-base);
25
- font-weight: 400;
26
- height: 2.5rem;
27
- line-height: var(--bs-leading-base);
28
- min-height: 2.5rem;
29
- padding-inline: 0.75rem;
30
- width: 100%;
31
- }
32
-
33
- textarea {
34
- height: auto;
35
- padding-block: 0.5rem;
36
- resize: vertical;
37
- }
38
-
39
- /* Generally applicable (all input types) */
40
- :is(input, textarea, select)::placeholder {
41
- color: var(--bs-violet-200);
42
- opacity: 1;
43
- }
44
-
45
-
46
- :is(input:where(:not([type='checkbox'], [type='radio']), textarea, select):where(:focus)) {
47
- box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
48
- 0 0 0 4px var(--outline-color, var(--bs-blue-400));
49
- outline: 2px solid transparent;
50
- }
51
- :where(.box) :is(input, textarea, select):where(:focus) {
12
+ :where(.box) :is(input, textarea, select):where(:focus-visible) {
52
13
  --offset-color: var(--bs-bg-subtle);
53
14
  }
54
- :where(.box[data-invert]) :is(input, textarea, select):where(:focus) {
15
+ :where(.box[data-invert]) :is(input, textarea, select):where(:focus-visible) {
55
16
  --offset-color: var(--bs-bg-invert);
56
17
  }
57
18
 
58
- :is(input, textarea, select):where([data-error]) {
59
- --outline-color: var(--bs-red-200);
60
- }
61
-
62
- :is(input:where(:not([type='checkbox'],[type='radio'])), textarea, select):where(:disabled) {
63
- background-color: var(--bs-gray-200);
64
- border-color: var(--bs-gray-400);
65
- color: var(--bs-gray-400);
66
- }
67
-
68
- /*
69
- Removes the built-in 'margin' on bottom of textarea
70
- see https://bugs.chromium.org/p/chromium/issues/detail?id=89530
71
- :has not fully supported yet but will work for most
72
- */
73
- :has(> textarea:only-child) {
74
- display: block;
75
- line-height: 0;
76
- }
77
-
78
- /* chrome user agent styling was applying opacity: 0.7 */
79
- :where(select:disabled) {
80
- opacity: 1;
81
- }
82
-
83
- :is(input, textarea, select):disabled::placeholder,
84
- :is(input, textarea, select)[disabled]::placeholder {
85
- color: var(--bs-gray-400);
86
- opacity: 1;
87
- }
88
-
89
- /* Select */
90
-
91
- select {
92
- /* URL Encoded SVG dropdown caret so there is something there */
93
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%230A0B19' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E");
94
- background-position: right 0.75rem center;
95
- background-repeat: no-repeat;
96
- background-size: 1em 1em;
97
- }
98
- .dark select {
99
- /* URL Encoded SVG dropdown caret so there is something there */
100
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E");
101
- }
102
-
103
- .dark select:disabled {
104
- /* URL Encoded SVG dropdown caret so there is something there */
105
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23555775' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E");
106
- }
107
-
108
19
  /* Errors and Messages */
109
20
  :is(input, select, textarea):where([data-error]) {
110
- --input-border: var(--bs-red-400);
21
+ --input-border: var(--bs-red-500);
111
22
  }
112
23
 
113
24
  /* Fieldset */
@@ -1,11 +1,14 @@
1
1
  @mixin form-hints() {
2
2
  .bs-hint {
3
+ min-width: 0;
3
4
  color: var(--bs-ink-light);
4
5
  font-size: var(--bs-text-xs);
5
6
  padding: 0;
6
7
  margin: 0;
7
8
  list-style: none;
9
+ overflow-wrap: break-word;
8
10
  }
11
+
9
12
  .bs-hint:where([data-error]) {
10
13
  color: var(--bs-red-400);
11
14
  }
@@ -0,0 +1,195 @@
1
+ @mixin form-input-composite() {
2
+ .bs-input-addon {
3
+ --input-border: var(--bs-violet-300);
4
+ align-items: center;
5
+ background-color: var(--input-bg, var(--bs-bg-base));
6
+ border-radius: .25rem;
7
+ color: var(--bs-ink-base);
8
+ display: flex;
9
+ height: 2.5rem;
10
+ overflow: hidden;
11
+ padding: 0;
12
+ pointer-events: none;
13
+ position: relative;
14
+ width: 100%;
15
+ }
16
+ /**
17
+ Implement an outer 'border' via pseudo-element instead of
18
+ on main element to avoid content shifting, double-stroke effect,
19
+ and issues with box-sizing
20
+ */
21
+ .bs-input-addon::after,
22
+ .bs-input-addon::before,
23
+ .bs-input-addon ::after,
24
+ .bs-input-addon ::before {
25
+ pointer-events: none;
26
+ }
27
+
28
+ .bs-input-addon::after,
29
+ .bs-input-addon::before {
30
+ content: '';
31
+ height: 100%;
32
+ left: 0;
33
+ position: absolute;
34
+ top: 0;
35
+ width: 100%;
36
+ }
37
+
38
+ .bs-input-addon::after {
39
+ border-radius: .25rem;
40
+ border: 1px solid var(--input-border);
41
+ }
42
+
43
+ .bs-input-addon > * {
44
+ flex-grow: 0;
45
+ flex-shrink: 0;
46
+ }
47
+ .bs-input-addon > :where(bs-input, input, .bs-input-addon) {
48
+ flex-grow: 1;
49
+ flex-shrink: 1;
50
+ }
51
+
52
+ .bs-input-addon > *:where(:not(.bs-input-addon)) {
53
+ background-color: var(--input-bg, var(--bs-bg-base));
54
+ border-width: 0px;
55
+ display: flex;
56
+ height: 100%;
57
+ overflow: hidden;
58
+ pointer-events: auto;
59
+ position: relative;
60
+ }
61
+
62
+ /* Remove (hide) children's borders, outlines */
63
+ .bs-input-addon > *,
64
+ .bs-input-addon :where(input, select),
65
+ .bs-input-addon :is(bs-input, bs-select) :where(input, select),
66
+ .bs-input-addon :where(.bs-input-addon)::after {
67
+ border-color: transparent;
68
+ border-width: 0px;
69
+ }
70
+
71
+ .bs-input-addon :where(:focus-within) :where(input, select),
72
+ .bs-input-addon :where(:focus-within) :is(bs-input, bs-select) :where(input, select),
73
+ .bs-input-addon :where(input, select):where(:focus, :focus-within, :focus-visible),
74
+ .bs-input-addon :is(bs-input, bs-select) :where(input, select):where(:focus, :focus-within, :focus-visible) {
75
+ --input-border: transparent;
76
+ box-shadow: none;
77
+ outline: none;
78
+ }
79
+
80
+ /* -------- Inner-bordered styles -------- */
81
+ /** Inner borders should be straight; shown only if variant: "inner-bordered" */
82
+ .bs-input-addon > :where(.bs-input-addon:not(:last-child, :focus-within)),
83
+ .bs-input-addon > :where(:not(:last-child, :focus-within))::after {
84
+ border-top-right-radius: 0;
85
+ border-bottom-right-radius: 0;
86
+ }
87
+
88
+ .bs-input-addon > :where(.bs-input-addon:not(:first-child, :focus-within)),
89
+ .bs-input-addon > :where(:not(:first-child, :focus-within))::after {
90
+ border-top-left-radius: 0;
91
+ border-bottom-left-radius: 0;
92
+ }
93
+
94
+ .bs-input-addon:where([data-variant="inner-bordered"]:not(.bs-input-addon .bs-input-addon)) > :where(:not(.bs-input-addon, :focus, :focus-within))::after {
95
+ border-right-color: var(--input-border);
96
+ border-right-width: 1px;
97
+ content: '';
98
+ height: 100%;
99
+ position: absolute;
100
+ width: 100%;
101
+ }
102
+
103
+ .bs-input-addon:where([data-variant="inner-bordered"]) > :where(.bs-input-addon)::after {
104
+ border-right-width: 1px;
105
+ border-right-color: var(--input-border);
106
+ border-radius: 0px;
107
+ }
108
+
109
+
110
+ /* -------- Focus styles -------- */
111
+
112
+ .bs-input-addon:where(:not([data-multifocus]):focus-within),
113
+ .bs-input-addon:where([data-multifocus]) :where(input, select):where(:focus, :focus-within, :focus-visible),
114
+ .bs-input-addon:where([data-multifocus]) :is(bs-input, bs-select) :where(input, select):where(:focus, :focus-within, :focus-visible) {
115
+ --input-border: var(--bs-blue-400);
116
+ position: relative;
117
+ z-index: 1;
118
+ }
119
+
120
+ .bs-input-addon :where(.bs-input-addon:where(:not([data-multifocus]):focus-within))::after {
121
+ border-color: var(--input-border);
122
+ border-radius: .25rem;
123
+ border-width: 1px;
124
+ z-index: 1;
125
+ }
126
+
127
+ .bs-input-addon:where([data-multifocus]) > :where(:not(.bs-input-addon)) > :where(input:focus),
128
+ .bs-input-addon:where([data-multifocus]) > bs-input :where(input:focus),
129
+ .bs-input-addon:where([data-multifocus]) > :where(input:focus) {
130
+ border-radius: .25rem;
131
+ box-shadow: var(--input-border) 0px 0px 0px 1px inset;
132
+ }
133
+
134
+ .bs-input-addon:where([data-multifocus]) > :where(:not(.bs-input-addon)) > :where(select:focus),
135
+ .bs-input-addon:where([data-multifocus]) > bs-select :where(select:focus),
136
+ .bs-input-addon:where([data-multifocus]) > :where(select:focus) {
137
+ border-radius: .25rem;
138
+ box-shadow: var(--input-border) 0px 0px 0px 2px inset;
139
+ }
140
+
141
+ .bs-input-addon:where(:not([data-multifocus]):focus-within)::after {
142
+ border-width: 1px;
143
+ border-radius: .25rem;
144
+ }
145
+
146
+ .bs-input-addon:where(:focus-within) :where(:not(:focus, :focus-within))::after,
147
+ .bs-input-addon:where(:focus-within) :where(:not(:focus, :focus-within)) {
148
+ border-color: transparent;
149
+ }
150
+
151
+ /* Straight-lined ::before border to fill the gap below the rounded ::after border */
152
+ .bs-input-addon:where([data-multifocus]) :where(:focus-within)::before {
153
+ border-bottom-width: 1px;
154
+ border-color: var(--bs-violet-300);
155
+ border-radius: 0;
156
+ border-top-width: 1px;
157
+ z-index: 1;
158
+ }
159
+
160
+ /* -------- Disabled styles -------- */
161
+ .bs-input-addon:where([data-disabled]:not([data-disabled="false"])),
162
+ .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) bs-button .bs-button {
163
+ --input-bg: var(--bs-gray-200);
164
+ --input-border: var(--bs-gray-400);
165
+ color: var(--bs-gray-400);
166
+ }
167
+ .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) * {
168
+ pointer-events: none;
169
+ }
170
+
171
+ /* -------- Error styles -------- */
172
+ .bs-input-addon:where([data-error]),
173
+ .bs-input-addon:where([data-error]) > ::after {
174
+ --input-border: var(--bs-red-400);
175
+ }
176
+
177
+ .bs-input-addon:where([data-error][data-multifocus]) > :where(:focus-within),
178
+ .bs-input-addon:where([data-error][data-multifocus]) :where(input, select):where(:focus, :focus-within, :focus-visible),
179
+ .bs-input-addon:where([data-error][data-multifocus]) :is(bs-input, bs-select) :where(input, select):where(:focus, :focus-within, :focus-visible) {
180
+ --input-border: var(--bs-red-400);
181
+ border-color: var(--input-border);
182
+ }
183
+
184
+ .bs-input-addon:where([data-error],[data-disabled]) > *::before,
185
+ .bs-input-addon:where(.bs-input-addon[data-error] .bs-input-addon, .bs-input-addon[data-disabled] .bs-input-addon) > *::before {
186
+ border-color: var(--input-border);
187
+ }
188
+
189
+ /* -------- Label margin -------- */
190
+ :where(label, .bs-label, bs-label) + .bs-input-addon {
191
+ margin-top: 0.25rem;
192
+ }
193
+
194
+ }
195
+
@@ -0,0 +1,96 @@
1
+ @mixin form-text-fields() {
2
+ :where(label + input, label > input):where(:not([type='checkbox'], [type='radio'])),
3
+ :where(label + textarea, label > textarea),
4
+ :where(label + select, label > select) {
5
+ margin-top: 0.25rem;
6
+ }
7
+
8
+ input:where(:not([type='checkbox'], [type='radio'], [type='file'], [type='range'])),
9
+ textarea, select {
10
+ appearance: none;
11
+ background-color: var(--input-bg, var(--bs-bg-base));
12
+ border: 1px solid var(--input-border, var(--bs-violet-300));
13
+ border-radius: 0.25rem;
14
+ caret-color: var(--bs-blue-400);
15
+ color: var(--bs-ink-base);
16
+ font-size: var(--bs-text-base);
17
+ font-weight: 400;
18
+ height: 2.5rem;
19
+ line-height: var(--bs-leading-base);
20
+ min-height: 2.5rem;
21
+ padding-inline: 0.75rem;
22
+ width: 100%;
23
+ }
24
+
25
+ textarea {
26
+ height: auto;
27
+ padding-block: 0.5rem;
28
+ resize: vertical;
29
+ }
30
+
31
+ :is(input, textarea, select)::placeholder {
32
+ color: var(--bs-violet-200);
33
+ }
34
+ :is(input, textarea, select):where(:focus-visible)::placeholder {
35
+ opacity: 0;
36
+ }
37
+
38
+ :is(input:where(:not([type='checkbox'], [type='radio'])), textarea, select):where(:focus-visible) {
39
+ --input-border: var(--bs-blue-400);
40
+ outline-width: 0px;
41
+ }
42
+
43
+ :is(input:where(:not([type='checkbox'],[type='radio'])), textarea, select):where(:disabled) {
44
+ --input-border: var(--bs-gray-400);
45
+ background-color: var(--bs-gray-200);
46
+ color: var(--bs-gray-400);
47
+ }
48
+
49
+ /* Errors and Messages */
50
+ :is(input, select, textarea):where([data-error]) {
51
+ --input-border: var(--bs-red-500);
52
+ }
53
+
54
+ /*
55
+ Removes the built-in 'margin' on bottom of textarea
56
+ see https://bugs.chromium.org/p/chromium/issues/detail?id=89530
57
+ :has not fully supported yet but will work for most
58
+ */
59
+ :has(> textarea:only-child) {
60
+ display: block;
61
+ line-height: 0;
62
+ }
63
+
64
+ /* chrome user agent styling was applying opacity: 0.7 */
65
+ :where(select:disabled) {
66
+ opacity: 1;
67
+ }
68
+
69
+ :is(input, textarea, select):disabled::placeholder,
70
+ :is(input, textarea, select)[disabled]::placeholder {
71
+ color: var(--bs-gray-400);
72
+ opacity: 1;
73
+ }
74
+
75
+ /* Select */
76
+
77
+ select {
78
+ /* URL Encoded SVG dropdown caret so there is something there */
79
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%230A0B19' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E");
80
+ background-position: right 0.75rem center;
81
+ background-repeat: no-repeat;
82
+ background-size: 1em 1em;
83
+ padding-right: var(--bs-space-9);
84
+ }
85
+ .dark select {
86
+ /* URL Encoded SVG dropdown caret so there is something there */
87
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E");
88
+ }
89
+
90
+ .dark select:disabled {
91
+ /* URL Encoded SVG dropdown caret so there is something there */
92
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23555775' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E");
93
+ }
94
+
95
+ }
96
+
@@ -65,18 +65,18 @@
65
65
  transform: rotate(180deg);
66
66
  }
67
67
 
68
- .bs-accordion :where(header button) > :where(h2, h3, h4, h5) {
68
+ .bs-accordion :where(header button) > :where(span) {
69
69
  grid-area: main;
70
70
  margin-right: var(--bs-space-2);
71
71
  text-align: left;
72
72
  }
73
73
 
74
- .bs-accordion :where(header button) > :where(h2, h3, h4, h5) :where(*) {
74
+ .bs-accordion :where(header button) > :where(span) {
75
75
  vertical-align: middle;
76
76
  }
77
77
 
78
78
  @media (min-width: 957px) {
79
- .bs-accordion :where(header button) > :where(h2, h3, h4, h5) {
79
+ .bs-accordion :where(header button) > :where(span) {
80
80
  margin-right: var(--bs-space-3);
81
81
  }
82
82
  }