@wwtdev/bsds-css 0.3.0 → 1.0.1

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 (34) hide show
  1. package/README.md +39 -3
  2. package/dist/components/_badge.scss +67 -0
  3. package/dist/components/_buttons.scss +193 -0
  4. package/dist/components/_form-booleans.scss +158 -0
  5. package/dist/components/_form-character-count.scss +20 -0
  6. package/dist/components/_form-elements.scss +117 -0
  7. package/dist/components/_form-field-details.scss +19 -0
  8. package/dist/components/_form-hints.scss +14 -0
  9. package/dist/components/_form-labels.scss +22 -0
  10. package/dist/components/_form-switches.scss +137 -0
  11. package/dist/components/_pills.scss +191 -0
  12. package/dist/components/_profile-details.scss +18 -0
  13. package/dist/components/_profile-img.scss +71 -0
  14. package/dist/components/_profile-layout.scss +33 -0
  15. package/dist/components/_tables.scss +84 -0
  16. package/dist/components/badge.css +63 -0
  17. package/dist/components/buttons.css +189 -0
  18. package/dist/components/form-booleans.css +154 -0
  19. package/dist/components/form-character-count.css +16 -0
  20. package/dist/components/form-elements.css +113 -0
  21. package/dist/components/form-field-details.css +15 -0
  22. package/dist/components/form-hints.css +10 -0
  23. package/dist/components/form-labels.css +18 -0
  24. package/dist/components/form-switches.css +133 -0
  25. package/dist/components/pills.css +187 -0
  26. package/dist/components/profile-details.css +14 -0
  27. package/dist/components/profile-img.css +67 -0
  28. package/dist/components/profile-layout.css +29 -0
  29. package/dist/components/tables.css +80 -0
  30. package/dist/wwt-bsds-preset.js +4 -0
  31. package/dist/wwt-bsds-wc-base.css +10 -2
  32. package/dist/wwt-bsds.css +47 -61
  33. package/dist/wwt-bsds.min.css +1 -1
  34. package/package.json +4 -8
package/README.md CHANGED
@@ -1,7 +1,43 @@
1
1
  # BSDS CSS Framework
2
2
 
3
- ## Developing Global Styles
3
+ ## Installation
4
4
 
5
- When adding styles with "global" or "global-like" selectors, developers should also add the `:host` selector.
5
+ ```bash
6
+ npm install --save @wwtdev/bsds-css
7
+ ```
6
8
 
7
- e.g., If you're adding styles with the `:root`, `html`, `body`, go ahead and slap a comma-separated `:host` selector there as well.
9
+ You can import the minified stylesheet in your project's `main.js` like so:
10
+
11
+ ```javascript
12
+ import '@wwtdev/bsds-css/dist/wwt-bsds.min.css'
13
+ ```
14
+
15
+ ## Using with Tailwind CSS
16
+
17
+ If your project uses Tailwind, complete the steps above and then [install Tailwind](https://tailwindcss.com/docs/installation) if you haven't already. You can follow the instructions in their docs with the exceptions listed below.
18
+
19
+ ### 1. Add the WWT Preset to the Tailwind config.
20
+
21
+ When setting up the `tailwind.config.js` file, import the WWT preset from the CSS Framework package.
22
+
23
+ ```javascript
24
+ module.exports = {
25
+ presets: [require('@wwtdev/bsds-css/dist/wwt-bsds-preset.js')]
26
+ };
27
+ ```
28
+
29
+ ### 2. Tailwind CSS Directives
30
+
31
+ Because our CSS Framework includes its own reset and default styles, you will only need to include the `utilities` directive.
32
+
33
+ ```css
34
+ @tailwind utilities;
35
+ ```
36
+
37
+ > Tailwind's base and component directives will cause conflicts with the CSS Framework.
38
+
39
+ Once you have completed the Tailwind installation steps, you can use the classes generated from the preset.
40
+
41
+ ### Browser Support
42
+
43
+ Our styles are compiled using Post CSS and Autoprefixer using the [`defaults` setting](https://github.com/browserslist/browserslist#full-list).
@@ -0,0 +1,67 @@
1
+ @mixin badge() {
2
+ .bs-badge[data-position^='left']::before,
3
+ .bs-badge:where(:not([data-position^='left']))::after {
4
+ align-items: center;
5
+ background: var(--bs-red-500);
6
+ border-radius: 0.5rem;
7
+ content: '';
8
+ display: inline-flex;
9
+ font-size: 0.8125rem;
10
+ font-variant-numeric: tabular-nums;
11
+ font-weight: 600;
12
+ height: 6px;
13
+ justify-content: center;
14
+ line-height: 1;
15
+ position: relative;
16
+ vertical-align: top;
17
+ width: 6px;
18
+ }
19
+
20
+ .bs-pill .bs-badge::before,
21
+ .bs-pill .bs-badge::after {
22
+ font-size: 0.8125em;
23
+ }
24
+
25
+ .bs-badge[data-count]:where([data-position^='left'])::before,
26
+ .bs-badge[data-count]:where(:not([data-position^='left']))::after {
27
+ color: white;
28
+ content: attr(data-count);
29
+ min-height: 1rem;
30
+ min-width: 1rem;
31
+ padding: 0 4px;
32
+ top: -0.0625rem;
33
+ vertical-align: unset;
34
+ width: auto;
35
+ }
36
+
37
+ .bs-badge[data-count]::before {
38
+ margin-right: 0.25rem;
39
+ }
40
+
41
+ .bs-badge[data-count]::after {
42
+ margin-left: 0.25rem;
43
+ }
44
+
45
+ .bs-badge[data-count='0']::before,
46
+ .bs-badge[data-count='0']::after {
47
+ display: none;
48
+ }
49
+
50
+ .bs-badge[data-show-zero]:where(:not([data-show-zero="false"]))::before,
51
+ .bs-badge[data-show-zero]:where(:not([data-show-zero="false"]))::after {
52
+ display: inline-flex;
53
+ }
54
+
55
+ .bs-badge[data-badge-color^='blue']::before,
56
+ .bs-badge[data-badge-color^='blue']::after {
57
+ background: var(--bs-blue-500);
58
+ }
59
+
60
+ .bs-badge[data-badge-color^='white']::before,
61
+ .bs-badge[data-badge-color^='white']::after {
62
+ background: white;
63
+ color: var(--badge-text, var(--bs-black));
64
+ }
65
+
66
+ }
67
+
@@ -0,0 +1,193 @@
1
+ @mixin buttons() {
2
+ :where(button) {
3
+ background-color: inherit;
4
+ border-color: transparent;
5
+ color: inherit;
6
+ font-size: var(--bs-text-base);
7
+ position: relative;
8
+ padding: var(--bs-space-0);
9
+ text-decoration: none;
10
+ }
11
+
12
+ .bs-button {
13
+ --btn-main: var(--bs-blue-400);
14
+ --btn-secondary: var(--bs-blue-300);
15
+ --btn-highlight: var(--bs-blue-100);
16
+ align-items: center;
17
+ background-color: var(--btn-main);
18
+ border: none;
19
+ border-radius: 0.25rem;
20
+ color: var(--bs-white);
21
+ cursor: pointer;
22
+ display: inline-flex;
23
+ font-size: var(--bs-text-md);
24
+ font-weight: 600;
25
+ justify-content: center;
26
+ line-height: 1.5;
27
+ outline: 2px solid transparent;
28
+ padding: var(--bs-space-1) var(--bs-space-4) calc(var(--bs-space-1) * 1.5);
29
+ position: relative;
30
+ text-decoration: none;
31
+ transition: all 100ms ease-in-out;
32
+ vertical-align: middle;
33
+ }
34
+
35
+
36
+ .bs-button:hover {
37
+ background-color: var(--btn-secondary);
38
+ }
39
+
40
+ .bs-button:active {
41
+ background-color: var(--btn-secondary);
42
+ transform: scale(0.97);
43
+ transform-origin: center;
44
+ box-shadow: inset 0px 0px 4px 1px var(--btn-main);
45
+ }
46
+
47
+ /* Button Focus Styles */
48
+ .bs-button::before {
49
+ border-color: transparent;
50
+ border-radius: 0.5rem;
51
+ border-style: solid;
52
+ border-width: 0.125rem;
53
+ content: '';
54
+ height: calc(100% + 0.5rem);
55
+ inset: -0.25rem;
56
+ position: absolute;
57
+ transition: border-color 0.125s ease-in-out;
58
+ width: calc(100% + 0.5rem);
59
+ }
60
+
61
+ .bs-button:focus::before {
62
+ border-color: var(--btn-main);
63
+ }
64
+
65
+ .bs-button:focus-visible::before {
66
+ border-color: var(--btn-main);
67
+ box-shadow: none;
68
+ }
69
+
70
+ .bs-button:focus:not(:focus-visible)::before {
71
+ border-color: transparent;
72
+ box-shadow: none;
73
+ }
74
+
75
+ /* Ghost Buttons */
76
+ .bs-button:where([data-ghost]) {
77
+ --btn-light: var(--bs-blue-10);
78
+ --btn-secondary: var(--bs-blue-10);
79
+ background-color: transparent;
80
+ box-shadow: inset 0 0 0 1px var(--btn-main);
81
+ color: var(--btn-main);
82
+ }
83
+ .bs-button:where([data-ghost])::before {
84
+ border-radius: 0.4375rem;
85
+ }
86
+ .bs-button:where([data-ghost]):hover,
87
+ .bs-button:where([data-ghost]):focus {
88
+ background-color: var(--btn-light);
89
+ }
90
+ .bs-button:where([data-ghost]):active {
91
+ box-shadow:
92
+ inset 0 0 0 1px var(--btn-main),
93
+ inset 0px 0px 4px 1px var(--btn-highlight);
94
+ }
95
+
96
+ /* Button type */
97
+ .bs-button:where([data-variant^='secondary']) {
98
+ --btn-main: var(--bs-plum-400);
99
+ --btn-secondary: var(--bs-plum-300);
100
+ --btn-light: var(--bs-plum-10);
101
+ --btn-highlight: var(--bs-plum-100);
102
+ }
103
+ .dark .bs-button:where([data-variant^='secondary']) {
104
+ --btn-main: var(--bs-plum-200);
105
+ --btn-secondary: var(--bs-plum-300);
106
+ --btn-light: var(--bs-navy-400);
107
+ --btn-highlight: var(--bs-plum-400);
108
+ }
109
+ .bs-button:where([data-variant^='positive']) {
110
+ --btn-main: var(--bs-purple-400);
111
+ --btn-secondary: var(--bs-purple-300);
112
+ --btn-light: var(--bs-purple-10);
113
+ --btn-highlight: var(--bs-purple-100);
114
+ }
115
+ .bs-button:where([data-variant^='warning']) {
116
+ --btn-main: var(--bs-orange-warning);
117
+ --btn-secondary: var(--bs-orange-300);
118
+ --btn-light: var(--bs-orange-10);
119
+ --btn-highlight: var(--bs-orange-100);
120
+ }
121
+ .bs-button:where([data-variant^='negative']) {
122
+ --btn-main: var(--bs-red-400);
123
+ --btn-secondary: var(--bs-red-300);
124
+ --btn-light: var(--bs-red-10);
125
+ --btn-highlight: var(--bs-red-100);
126
+ }
127
+
128
+ /* Text Button */
129
+ .bs-button:where([data-text]) {
130
+ background-color: transparent;
131
+ color: var(--bs-blue-500);
132
+ cursor: pointer;
133
+ font-size: var(--bs-text-md);
134
+ font-weight: 400;
135
+ line-height: 150%;
136
+ }
137
+ .bs-button:where([data-text]):hover {
138
+ background-color: transparent;
139
+ text-decoration: underline;
140
+ }
141
+ .bs-button:where([data-text]):active {
142
+ box-shadow: none;
143
+ }
144
+
145
+ /* Button Size */
146
+ .bs-button:where([data-size^='sm']) {
147
+ font-size: var(--bs-text-sm);
148
+ }
149
+ .bs-button:where([data-text][data-size^='sm']) {
150
+ font-size: var(--bs-text-base);
151
+ }
152
+
153
+ /* Disabled Styling */
154
+ :where(button:disabled),
155
+ .bs-button:where([aria-disabled='true']) /* for links as buttons */ {
156
+ pointer-events: none;
157
+ }
158
+ .bs-button:where(:disabled),
159
+ .bs-button:where([aria-disabled='true']) {
160
+ color: var(--bs-gray-400);
161
+ background-color: var(--bs-gray-200);
162
+ }
163
+
164
+ .bs-button:where([data-ghost]):disabled,
165
+ .bs-button:where([data-ghost])[aria-disabled='true'] {
166
+ box-shadow: inset 0 0 0 1px var(--bs-gray-400);
167
+ }
168
+
169
+ .bs-button:where([data-text]):disabled,
170
+ .bs-button:where([data-text][aria-disabled='true']) {
171
+ background-color: transparent;
172
+ }
173
+
174
+ /* Icon Height */
175
+ .bs-button :where(svg:not([height])) {
176
+ height: var(--bs-text-base);
177
+ }
178
+
179
+ .bs-button:where([data-size^='sm']) :where(svg:not([height])) {
180
+ height: var(--bs-text-xs);
181
+ }
182
+
183
+ /* links as buttons */
184
+ a.bs-button {
185
+ align-items: center;
186
+ display: inline-flex;
187
+ outline: none;
188
+ vertical-align: middle;
189
+ }
190
+
191
+
192
+ }
193
+
@@ -0,0 +1,158 @@
1
+ @mixin form-booleans() {
2
+ /* Containers and Labels for Checkbox/Radio */
3
+ .bs-boolean {
4
+ display: flex;
5
+ align-items: center;
6
+ font-size: var(--bs-text-base);
7
+ font-weight: 400;
8
+ gap: 0.5em;
9
+ line-height: 115%;
10
+ }
11
+
12
+ .bs-boolean:where([data-size='sm']) input {
13
+ width: var(--bs-text-xs);
14
+ height: var(--bs-text-xs);
15
+ }
16
+
17
+ .bs-boolean label {
18
+ font-size: var(--bs-text-base);
19
+ font-weight: 400;
20
+ line-height: 1.5;
21
+ width: auto;
22
+ }
23
+
24
+ .bs-boolean:where([data-size='sm']),
25
+ .bs-boolean:where([data-size='sm']) label {
26
+ font-size: var(--bs-text-xs);
27
+ }
28
+
29
+
30
+ /* Checkbox & Radio Input */
31
+
32
+ :where(input[type^='checkbox'], input[type^='radio']) {
33
+ --box-shadow: var(--bs-ink-base);
34
+
35
+ appearance: none;
36
+ background-color: var(--bg-base);
37
+ box-shadow: inset 0 0 0 0.125rem var(--box-shadow);
38
+ display: grid;
39
+ height: 1rem;
40
+ margin: 0;
41
+ place-content: center;
42
+ position: relative;
43
+ width: 1rem;
44
+ }
45
+
46
+ :where(input[type^='checkbox'], input[type^='radio']):focus {
47
+ box-shadow: inset 0 0 0 0.125rem var(--box-shadow),
48
+ 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
49
+ 0 0 0 4px var(--outline-color, var(--bs-blue-400));
50
+ }
51
+
52
+ :where(input[type^='checkbox']) {
53
+ border-radius: 0.125rem;
54
+ }
55
+
56
+ :where(input[type^='radio']) {
57
+ border-radius: 50%;
58
+ }
59
+
60
+ input:where([type='checkbox'])::before {
61
+ --filled-size: 1rem;
62
+ --check-fill-color: var(--bs-blue-400);
63
+
64
+ content: '';
65
+ border-radius: 0.125rem;
66
+ box-shadow: inset var(--filled-size) var(--filled-size) var(--check-fill-color);
67
+ height: var(--filled-size);
68
+ visibility: hidden;
69
+ width: var(--filled-size);
70
+ }
71
+
72
+ input:where([type^='checkbox'])::after {
73
+ border: solid var(--bs-white);
74
+ border-width: 0 0.125rem 0.125rem 0;
75
+ content: '';
76
+ height: 0.75em;
77
+ left: 50%;
78
+ position: absolute;
79
+ top: 50%;
80
+ transform-origin: center;
81
+ transform: translate(-50%, -60%) rotate(45deg);
82
+ visibility: hidden;
83
+ width: 0.375em;
84
+ }
85
+
86
+ input:where([type='radio'])::before {
87
+ --filled-size: 1rem;
88
+ --radio-fill-color: var(--bs-blue-400);
89
+
90
+ background-color: var(--radio-fill-color);
91
+ border-radius: 50%;
92
+ box-sizing: content-box;
93
+ content: '';
94
+ height: var(--filled-size);
95
+ visibility: hidden;
96
+ width: var(--filled-size);
97
+ }
98
+
99
+ input:where([type='radio'])::after {
100
+ --inner-size: 0.375rem;
101
+ --inner-fill-color: var(--bs-white);
102
+
103
+ background-color: var(--inner-fill-color);
104
+ border-radius: 50%;
105
+ box-sizing: content-box;
106
+ content: '';
107
+ height: var(--inner-size);
108
+ left: 50%;
109
+ position: absolute;
110
+ top: 50%;
111
+ transform: translate(-50%, -50%);
112
+ visibility: hidden;
113
+ width: var(--inner-size);
114
+ }
115
+
116
+ input:where([type='checkbox']:checked, [type='radio']:checked)::before,
117
+ input:where([type='checkbox']:checked, [type='radio']:checked)::after {
118
+ visibility: visible;
119
+ }
120
+
121
+ .bs-boolean:where([data-size='sm']) input::before {
122
+ --filled-size: var(--bs-text-xs);
123
+ }
124
+
125
+ .bs-boolean:where([data-size='sm']) input[type='checkbox']::after {
126
+ height: 0.5625rem;
127
+ width: 0.3125rem;
128
+ }
129
+
130
+ .bs-boolean:where([data-size='sm']) input[type='radio']::after {
131
+ --inner-size: 0.25rem;
132
+ }
133
+
134
+
135
+ /* Disabled State */
136
+
137
+ input:where([type='checkbox'], [type='radio']):disabled {
138
+ --box-shadow: var(--bs-gray-400);
139
+ background-color: transparent;
140
+ }
141
+
142
+ input:where([type='checkbox']):checked:disabled::before {
143
+ --check-fill-color: var(--bs-gray-400);
144
+ }
145
+
146
+ input:where([type='radio']):checked:disabled::before {
147
+ --radio-fill-color: var(--bs-gray-400);
148
+ }
149
+
150
+
151
+ /* Error state */
152
+
153
+ input:where([type^='checkbox'], [type^='radio'])[data-error] {
154
+ --box-shadow: var(--bs-red-400);
155
+ }
156
+
157
+ }
158
+
@@ -0,0 +1,20 @@
1
+ @mixin form-character-count() {
2
+ .bs-character-count {
3
+ color: var(--bs-ink-base);
4
+ font-size: var(--bs-text-xs);
5
+ font-weight: 400;
6
+ text-align: right;
7
+ }
8
+
9
+ :where([disabled], [data-disabled]) + .bs-character-count,
10
+ :where([disabled], [data-disabled]) .bs-character-count,
11
+ .bs-character-count:where([data-disabled]) {
12
+ color: var(--bs-gray-400);
13
+ }
14
+
15
+ .bs-character-count:where([data-error]) {
16
+ color: var(--bs-red-400);
17
+ }
18
+
19
+ }
20
+
@@ -0,0 +1,117 @@
1
+ @mixin form-elements() {
2
+ :where([data-required]) {
3
+ color: var(--bs-red-400);
4
+ }
5
+
6
+ :where([data-disabled], [data-disabled] [data-required]) {
7
+ color: var(--bs-gray-400);
8
+ }
9
+
10
+ :where(label + input, label > input):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: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
+ line-height: var(--bs-leading-base);
26
+ min-height: 40px;
27
+ padding: 0.5rem 0.75rem;
28
+ width: 100%;
29
+ }
30
+
31
+ /* Generally applicable (all input types) */
32
+ :is(input, textarea, select)::placeholder {
33
+ color: var(--bs-violet-200);
34
+ opacity: 1;
35
+ }
36
+
37
+ :is(input, textarea, select):focus {
38
+ box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
39
+ 0 0 0 4px var(--outline-color, var(--bs-blue-400));
40
+ outline: 2px solid transparent;
41
+ }
42
+ :where(.box) :is(input, textarea, select):focus {
43
+ --offset-color: var(--bs-bg-subtle);
44
+ }
45
+ :where(.box[data-invert]) :is(input, textarea, select):focus {
46
+ --offset-color: var(--bs-bg-invert);
47
+ }
48
+
49
+ :is(input, textarea, select):where([data-error]) {
50
+ --outline-color: var(--bs-red-200);
51
+ }
52
+
53
+ :is(input, textarea, select):disabled {
54
+ background-color: var(--bs-gray-200);
55
+ border-color: var(--bs-gray-400);
56
+ color: var(--bs-gray-400);
57
+ }
58
+
59
+ /*
60
+ Removes the built-in 'margin' on bottom of textarea
61
+ see https://bugs.chromium.org/p/chromium/issues/detail?id=89530
62
+ :has not fully supported yet but will work for most
63
+ */
64
+ :has(> textarea:only-child) {
65
+ display: block;
66
+ line-height: 0;
67
+ }
68
+
69
+ /* chrome user agent styling was applying opacity: 0.7 */
70
+ :where(select:disabled) {
71
+ opacity: 1;
72
+ }
73
+
74
+ :is(input, textarea, select):disabled::placeholder,
75
+ :is(input, textarea, select)[disabled]::placeholder {
76
+ color: var(--bs-gray-400);
77
+ opacity: 1;
78
+ }
79
+
80
+ /* Select */
81
+
82
+ select {
83
+ /* URL Encoded SVG dropdown caret so there is something there */
84
+ 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");
85
+ background-position: right 0.75rem center;
86
+ background-repeat: no-repeat;
87
+ background-size: 1em 1em;
88
+ }
89
+ .dark select {
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='%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");
92
+ }
93
+
94
+ .dark select:disabled {
95
+ /* URL Encoded SVG dropdown caret so there is something there */
96
+ 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");
97
+ }
98
+
99
+ /* Errors and Messages */
100
+ :is(input, select, textarea):where([data-error]) {
101
+ --input-border: var(--bs-red-400);
102
+ }
103
+
104
+ /* Fieldset */
105
+ :where(fieldset) {
106
+ border: none;
107
+ margin-left: 0;
108
+ margin-right: 0;
109
+ padding: 0;
110
+ }
111
+ :where(fieldset legend) {
112
+ margin-bottom: 0.25rem;
113
+ padding: 0;
114
+ }
115
+
116
+ }
117
+
@@ -0,0 +1,19 @@
1
+ @mixin form-field-details() {
2
+ .bs-field-details {
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ padding: 0 0.75rem;
7
+ margin-top: 0.5rem;
8
+ }
9
+
10
+ :where(textarea, bs-textarea) + .bs-field-details {
11
+ margin-top: 0.25rem;
12
+ }
13
+
14
+ .bs-field-details :where(.bs-character-count:first-child) {
15
+ margin-left: auto;
16
+ }
17
+
18
+ }
19
+
@@ -0,0 +1,14 @@
1
+ @mixin form-hints() {
2
+ .bs-hint {
3
+ color: var(--bs-ink-light);
4
+ font-size: var(--bs-text-xs);
5
+ padding: 0;
6
+ margin: 0;
7
+ list-style: none;
8
+ }
9
+ .bs-hint:where([data-error]) {
10
+ color: var(--bs-red-400);
11
+ }
12
+
13
+ }
14
+
@@ -0,0 +1,22 @@
1
+ @mixin form-labels() {
2
+ :where(label, legend) {
3
+ --label-color: var(--bs-ink-base);
4
+
5
+ color: var(--label-color);
6
+ display: inline-block;
7
+ font-size: var(--bs-text-sm);
8
+ font-weight: 600;
9
+ line-height: var(--bs-leading-base);
10
+ width: 100%;
11
+ }
12
+
13
+ :where([data-required]) {
14
+ color: var(--bs-red-400);
15
+ }
16
+
17
+ :where(label[data-disabled], [data-disabled] [data-required], [data-disabled] label) {
18
+ --label-color: var(--bs-ink-light);
19
+ }
20
+
21
+ }
22
+