@oardi/css-utils 0.105.0 → 0.107.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/css-utils",
3
- "version": "0.105.0",
3
+ "version": "0.107.0",
4
4
  "author": "Ardian Shala",
5
5
  "homepage": "https://css-utils.oardi.com",
6
6
  "description": "Powerful set of semantic css classes with support for breakpoints, directions and spacings",
package/readme.md CHANGED
@@ -68,6 +68,8 @@ Responsive utilities are mobile-first. Classes without a breakpoint apply at eve
68
68
  </div>
69
69
  ```
70
70
 
71
+ Display utilities intentionally override the grid container at their active breakpoint. For example, `class="grid d-lg-block"` uses the grid below `lg` and switches to block layout from `lg` upward.
72
+
71
73
  ## Browser support
72
74
 
73
75
  The minimum supported versions for the compiled library CSS are:
@@ -241,7 +241,7 @@
241
241
  border-color: var(--form-check-input-checked-border-color);
242
242
  }
243
243
 
244
- &[type='checkbox']:checked::after {
244
+ &:where([type='checkbox']):checked::after {
245
245
  content: '';
246
246
  position: absolute;
247
247
  inset-inline-start: 0.25rem;
@@ -253,6 +253,23 @@
253
253
  transform: rotate(45deg);
254
254
  }
255
255
 
256
+ &:where([type='checkbox']):indeterminate {
257
+ background-color: var(--form-check-input-checked-bg-color);
258
+ border-color: var(--form-check-input-checked-border-color);
259
+
260
+ &::after {
261
+ content: '';
262
+ position: absolute;
263
+ inset-inline: 0.1875rem;
264
+ inset-block-start: calc(50% - 0.0625rem);
265
+ width: auto;
266
+ height: 0.125rem;
267
+ background-color: var(--form-check-input-checked-color);
268
+ border: 0;
269
+ transform: none;
270
+ }
271
+ }
272
+
256
273
  &[type='radio'] {
257
274
  border-radius: 9999px;
258
275
  }
@@ -293,6 +310,10 @@
293
310
  background-color: var(--form-check-disabled-bg-color);
294
311
  border-color: var(--form-check-disabled-border-color);
295
312
 
313
+ &:where([type='checkbox']):indeterminate::after {
314
+ background-color: var(--disabled-text-color);
315
+ }
316
+
296
317
  & + .form-label {
297
318
  color: var(--disabled-text-color);
298
319
  cursor: not-allowed;
@@ -306,6 +327,59 @@
306
327
  }
307
328
  }
308
329
 
330
+ @layer components {
331
+ @media (forced-colors: active) {
332
+ .form-check .form-check-input:where([type='checkbox']) {
333
+ forced-color-adjust: none;
334
+ background-color: Canvas;
335
+ border-color: CanvasText;
336
+
337
+ &:checked,
338
+ &:indeterminate {
339
+ background-color: Highlight;
340
+ border-color: Highlight;
341
+ }
342
+
343
+ &:checked::after {
344
+ border-color: HighlightText;
345
+ }
346
+
347
+ &:indeterminate::after {
348
+ background-color: HighlightText;
349
+ }
350
+
351
+ &:focus-visible,
352
+ &.is-focus-visible {
353
+ border-color: Highlight;
354
+ outline-color: Highlight;
355
+ }
356
+
357
+ &.is-invalid {
358
+ border-color: LinkText;
359
+
360
+ &:focus-visible,
361
+ &.is-focus-visible {
362
+ outline-color: Highlight;
363
+ }
364
+ }
365
+
366
+ &:disabled,
367
+ &[disabled] {
368
+ background-color: Canvas;
369
+ border-color: GrayText;
370
+
371
+ &:checked::after {
372
+ border-color: GrayText;
373
+ }
374
+
375
+ &:indeterminate::after {
376
+ background-color: GrayText;
377
+ }
378
+ }
379
+ }
380
+ }
381
+ }
382
+
309
383
  @layer components {
310
384
  .form-label {
311
385
  display: inline-block;
package/scss/display.scss CHANGED
@@ -11,7 +11,7 @@ $-display-values: (
11
11
  inline-flex: inline-flex,
12
12
  );
13
13
 
14
- @layer utilities {
14
+ @layer utilities.display {
15
15
  @each $name, $value in $-display-values {
16
16
  .d-#{$name} {
17
17
  display: $value;
package/scss/grid.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  @use './layers.scss';
2
2
 
3
- @layer utilities {
3
+ @layer utilities.grid {
4
4
  .grid {
5
5
  --grid-gap: var(--spacer-3);
6
6
 
package/scss/layers.scss CHANGED
@@ -1 +1,2 @@
1
1
  @layer reset, base, components, utilities;
2
+ @layer utilities.grid, utilities.display;