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