@cirthcss/cirth 0.9.0 → 0.10.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.
@@ -1395,6 +1395,50 @@
1395
1395
  pointer-events: none;
1396
1396
  }
1397
1397
 
1398
+ .cirth meter {
1399
+ appearance: none;
1400
+ width: 100%;
1401
+ height: var(--cirth-size-2);
1402
+ margin-bottom: calc(var(--cirth-spacing) * .5);
1403
+ border: var(--cirth-border-width-1) solid var(--cirth-meter-border-color);
1404
+ border-radius: var(--cirth-border-radius);
1405
+ background: var(--cirth-meter-background-color);
1406
+ display: inline-block;
1407
+ overflow: hidden;
1408
+ }
1409
+
1410
+ .cirth meter::-webkit-meter-bar {
1411
+ background: none;
1412
+ }
1413
+
1414
+ .cirth meter::-webkit-meter-inner-element {
1415
+ display: flex;
1416
+ }
1417
+
1418
+ .cirth meter::-webkit-meter-optimum-value {
1419
+ background: var(--cirth-meter-optimum-color);
1420
+ }
1421
+
1422
+ .cirth meter::-webkit-meter-suboptimum-value {
1423
+ background: var(--cirth-meter-suboptimum-color);
1424
+ }
1425
+
1426
+ .cirth meter::-webkit-meter-even-less-good-value {
1427
+ background: var(--cirth-meter-even-less-good-color);
1428
+ }
1429
+
1430
+ .cirth meter::-moz-meter-bar {
1431
+ background: var(--cirth-meter-optimum-color);
1432
+ }
1433
+
1434
+ .cirth meter:-moz-meter-sub-optimum::-moz-meter-bar {
1435
+ background: var(--cirth-meter-suboptimum-color);
1436
+ }
1437
+
1438
+ .cirth meter:-moz-meter-sub-sub-optimum::-moz-meter-bar {
1439
+ background: var(--cirth-meter-even-less-good-color);
1440
+ }
1441
+
1398
1442
  .cirth {
1399
1443
  --cirth-scrollbar-width: 0px;
1400
1444
  }
@@ -1962,6 +2006,8 @@
1962
2006
  var(--cirth-primary-focus);
1963
2007
  --cirth-group-box-shadow-focus-with-input: 0 0 0 var(--cirth-border-width-1)
1964
2008
  var(--cirth-form-element-border-color);
2009
+ --cirth-meter-background-color: var(--cirth-progress-background-color);
2010
+ --cirth-meter-border-color: var(--cirth-progress-border-color);
1965
2011
  --cirth-modal-overlay-backdrop-filter: blur(.375rem);
1966
2012
  --cirth-nav-element-spacing-vertical: var(--cirth-space-4);
1967
2013
  --cirth-nav-element-spacing-horizontal: var(--cirth-space-2);
@@ -2104,7 +2150,7 @@
2104
2150
  filter: brightness(0) invert();
2105
2151
  }
2106
2152
 
2107
- .cirth[data-theme="light"], .cirth [data-theme="light"], .cirth:not([data-theme="dark"]) {
2153
+ .cirth:where([data-theme="light"]), .cirth :where([data-theme="light"]), .cirth:where(:not([data-theme="dark"])) {
2108
2154
  --lightningcss-light: initial;
2109
2155
  --lightningcss-dark: ;
2110
2156
  color-scheme: light;
@@ -2199,6 +2245,9 @@
2199
2245
  --cirth-card-sectioning-background-color: oklch(99% 0 336);
2200
2246
  --cirth-loading-spinner-opacity: var(--cirth-opacity-disabled);
2201
2247
  --cirth-modal-overlay-background-color: oklch(93.85% .003 264deg / var(--cirth-opacity-overlay));
2248
+ --cirth-meter-optimum-color: oklch(52.7% .1 160.59);
2249
+ --cirth-meter-suboptimum-color: oklch(48.3% .086 78);
2250
+ --cirth-meter-even-less-good-color: oklch(44% .151 29.73);
2202
2251
  --cirth-progress-background-color: oklch(91.7% .006 264);
2203
2252
  --cirth-progress-border-color: oklch(61.3% .032 264);
2204
2253
  --cirth-progress-color: var(--cirth-primary-background);
@@ -2208,12 +2257,12 @@
2208
2257
  --cirth-icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(189, 47, 33)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
2209
2258
  }
2210
2259
 
2211
- .cirth[data-theme="light"] input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]), .cirth [data-theme="light"] input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]), .cirth:not([data-theme="dark"]) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
2260
+ .cirth:where([data-theme="light"]) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]), .cirth :where([data-theme="light"]) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]), .cirth:where(:not([data-theme="dark"])) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
2212
2261
  --cirth-form-element-focus-color: var(--cirth-primary-focus);
2213
2262
  }
2214
2263
 
2215
2264
  @media only screen and (prefers-color-scheme: dark) {
2216
- .cirth:not([data-theme]) {
2265
+ .cirth:where(:not([data-theme])) {
2217
2266
  --lightningcss-light: ;
2218
2267
  --lightningcss-dark: initial;
2219
2268
  color-scheme: dark;
@@ -2308,6 +2357,9 @@
2308
2357
  --cirth-card-sectioning-background-color: oklch(23.4% .00725 264);
2309
2358
  --cirth-loading-spinner-opacity: var(--cirth-opacity-disabled);
2310
2359
  --cirth-modal-overlay-background-color: oklch(9% 0 312deg / var(--cirth-opacity-overlay));
2360
+ --cirth-meter-optimum-color: oklch(65.7% .125 160.59);
2361
+ --cirth-meter-suboptimum-color: oklch(70% .124 78);
2362
+ --cirth-meter-even-less-good-color: oklch(74.3% .133 29.73);
2311
2363
  --cirth-progress-background-color: oklch(26.7% .011 264);
2312
2364
  --cirth-progress-border-color: oklch(52.7% .032 264);
2313
2365
  --cirth-progress-color: oklch(61.3% .113 69.35);
@@ -2317,12 +2369,12 @@
2317
2369
  --cirth-icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(246, 160, 145)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
2318
2370
  }
2319
2371
 
2320
- .cirth:not([data-theme]) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
2372
+ .cirth:where(:not([data-theme])) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
2321
2373
  --cirth-form-element-focus-color: var(--cirth-primary-focus);
2322
2374
  }
2323
2375
  }
2324
2376
 
2325
- .cirth[data-theme="dark"], .cirth [data-theme="dark"] {
2377
+ .cirth:where([data-theme="dark"]), .cirth :where([data-theme="dark"]) {
2326
2378
  --lightningcss-light: ;
2327
2379
  --lightningcss-dark: initial;
2328
2380
  color-scheme: dark;
@@ -2417,6 +2469,9 @@
2417
2469
  --cirth-card-sectioning-background-color: oklch(23.4% .00725 264);
2418
2470
  --cirth-loading-spinner-opacity: var(--cirth-opacity-disabled);
2419
2471
  --cirth-modal-overlay-background-color: oklch(9% 0 312deg / var(--cirth-opacity-overlay));
2472
+ --cirth-meter-optimum-color: oklch(65.7% .125 160.59);
2473
+ --cirth-meter-suboptimum-color: oklch(70% .124 78);
2474
+ --cirth-meter-even-less-good-color: oklch(74.3% .133 29.73);
2420
2475
  --cirth-progress-background-color: oklch(26.7% .011 264);
2421
2476
  --cirth-progress-border-color: oklch(52.7% .032 264);
2422
2477
  --cirth-progress-color: oklch(61.3% .113 69.35);
@@ -2426,10 +2481,236 @@
2426
2481
  --cirth-icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(246, 160, 145)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
2427
2482
  }
2428
2483
 
2429
- .cirth[data-theme="dark"] input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]), .cirth [data-theme="dark"] input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
2484
+ .cirth:where([data-theme="dark"]) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]), .cirth :where([data-theme="dark"]) input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
2430
2485
  --cirth-form-element-focus-color: var(--cirth-primary-focus);
2431
2486
  }
2432
2487
 
2433
2488
  .cirth progress, .cirth [type="checkbox"], .cirth [type="radio"], .cirth [type="range"] {
2434
2489
  accent-color: var(--cirth-primary);
2435
2490
  }
2491
+
2492
+ @media (prefers-contrast: more) {
2493
+ .cirth:where([data-theme="light"]), .cirth :where([data-theme="light"]), .cirth:where(:not([data-theme="dark"])) {
2494
+ --cirth-color: oklch(22.3% .006 264);
2495
+ --cirth-h1-color: var(--cirth-color);
2496
+ --cirth-h2-color: var(--cirth-color);
2497
+ --cirth-h3-color: var(--cirth-color);
2498
+ --cirth-h4-color: var(--cirth-color);
2499
+ --cirth-h5-color: var(--cirth-color);
2500
+ --cirth-h6-color: var(--cirth-color);
2501
+ --cirth-muted-color: oklch(39.7% .025 264);
2502
+ --cirth-secondary: oklch(39.7% .025 264);
2503
+ --cirth-code-color: oklch(35.3% .021 264);
2504
+ --cirth-link-visited-color: oklch(35.3% .021 264);
2505
+ --cirth-muted-border-color: oklch(57% .032 264);
2506
+ --cirth-form-element-border-color: oklch(39.7% .025 264);
2507
+ --cirth-form-element-invalid-border-color: oklch(48.3% .166 29.73);
2508
+ --cirth-form-element-valid-border-color: oklch(48.3% .092 160.59);
2509
+ --cirth-primary: oklch(39.7% .073 69.35);
2510
+ --cirth-primary-hover: oklch(31% .057 69.35);
2511
+ --cirth-primary-underline: var(--cirth-primary);
2512
+ --cirth-secondary-underline: var(--cirth-secondary);
2513
+ --cirth-contrast-underline: var(--cirth-contrast);
2514
+ --cirth-primary-focus: oklch(48.3% .089 69.35);
2515
+ --cirth-secondary-focus: oklch(48.3% .03 264);
2516
+ --cirth-contrast-focus: oklch(48.3% .03 264);
2517
+ --cirth-switch-background-color: oklch(48.3% .03 264);
2518
+ --cirth-progress-border-color: oklch(48.3% .03 264);
2519
+ --cirth-meter-optimum-color: oklch(44% .084 160.59);
2520
+ --cirth-meter-suboptimum-color: oklch(39.7% .07 78);
2521
+ --cirth-meter-even-less-good-color: oklch(35.3% .122 29.73);
2522
+ }
2523
+ }
2524
+
2525
+ @media only screen and (prefers-contrast: more) and (prefers-color-scheme: dark) {
2526
+ .cirth:where(:not([data-theme])) {
2527
+ --cirth-color: oklch(96% 0 264);
2528
+ --cirth-h1-color: var(--cirth-color);
2529
+ --cirth-h2-color: var(--cirth-color);
2530
+ --cirth-h3-color: var(--cirth-color);
2531
+ --cirth-h4-color: var(--cirth-color);
2532
+ --cirth-h5-color: var(--cirth-color);
2533
+ --cirth-h6-color: var(--cirth-color);
2534
+ --cirth-muted-color: oklch(78.7% .021 264);
2535
+ --cirth-secondary: oklch(78.7% .021 264);
2536
+ --cirth-code-color: oklch(83% .016 264);
2537
+ --cirth-link-visited-color: oklch(78.7% .021 264);
2538
+ --cirth-muted-border-color: oklch(57% .032 264);
2539
+ --cirth-card-border-color: var(--cirth-muted-border-color);
2540
+ --cirth-form-element-border-color: oklch(70% .028 264);
2541
+ --cirth-form-element-invalid-border-color: oklch(78.7% .106 29.73);
2542
+ --cirth-form-element-valid-border-color: oklch(78.7% .15 160.59);
2543
+ --cirth-primary: oklch(78.7% .146 69.35);
2544
+ --cirth-primary-hover: oklch(87.3% .082 69.35);
2545
+ --cirth-primary-underline: var(--cirth-primary);
2546
+ --cirth-secondary-underline: var(--cirth-secondary);
2547
+ --cirth-contrast-underline: var(--cirth-contrast);
2548
+ --cirth-primary-focus: oklch(70% .129 69.35);
2549
+ --cirth-secondary-focus: oklch(70% .028 264);
2550
+ --cirth-contrast-focus: oklch(87.3% .011 264);
2551
+ --cirth-switch-background-color: oklch(65.7% .03 264);
2552
+ --cirth-progress-border-color: oklch(70% .028 264);
2553
+ --cirth-meter-optimum-color: oklch(74.3% .142 160.59);
2554
+ --cirth-meter-suboptimum-color: oklch(78.7% .139 78);
2555
+ --cirth-meter-even-less-good-color: oklch(83% .081 29.73);
2556
+ }
2557
+ }
2558
+
2559
+ @media (prefers-contrast: more) {
2560
+ .cirth:where([data-theme="dark"]), .cirth :where([data-theme="dark"]) {
2561
+ --cirth-color: oklch(96% 0 264);
2562
+ --cirth-h1-color: var(--cirth-color);
2563
+ --cirth-h2-color: var(--cirth-color);
2564
+ --cirth-h3-color: var(--cirth-color);
2565
+ --cirth-h4-color: var(--cirth-color);
2566
+ --cirth-h5-color: var(--cirth-color);
2567
+ --cirth-h6-color: var(--cirth-color);
2568
+ --cirth-muted-color: oklch(78.7% .021 264);
2569
+ --cirth-secondary: oklch(78.7% .021 264);
2570
+ --cirth-code-color: oklch(83% .016 264);
2571
+ --cirth-link-visited-color: oklch(78.7% .021 264);
2572
+ --cirth-muted-border-color: oklch(57% .032 264);
2573
+ --cirth-card-border-color: var(--cirth-muted-border-color);
2574
+ --cirth-form-element-border-color: oklch(70% .028 264);
2575
+ --cirth-form-element-invalid-border-color: oklch(78.7% .106 29.73);
2576
+ --cirth-form-element-valid-border-color: oklch(78.7% .15 160.59);
2577
+ --cirth-primary: oklch(78.7% .146 69.35);
2578
+ --cirth-primary-hover: oklch(87.3% .082 69.35);
2579
+ --cirth-primary-underline: var(--cirth-primary);
2580
+ --cirth-secondary-underline: var(--cirth-secondary);
2581
+ --cirth-contrast-underline: var(--cirth-contrast);
2582
+ --cirth-primary-focus: oklch(70% .129 69.35);
2583
+ --cirth-secondary-focus: oklch(70% .028 264);
2584
+ --cirth-contrast-focus: oklch(87.3% .011 264);
2585
+ --cirth-switch-background-color: oklch(65.7% .03 264);
2586
+ --cirth-progress-border-color: oklch(70% .028 264);
2587
+ --cirth-meter-optimum-color: oklch(74.3% .142 160.59);
2588
+ --cirth-meter-suboptimum-color: oklch(78.7% .139 78);
2589
+ --cirth-meter-even-less-good-color: oklch(83% .081 29.73);
2590
+ }
2591
+ }
2592
+
2593
+ @media print {
2594
+ .cirth {
2595
+ --cirth-print-color: oklch(0% 0 0);
2596
+ --cirth-print-muted-color: oklch(48.3% .03 264);
2597
+ --cirth-print-border-color: oklch(61.3% .032 264);
2598
+ color: var(--cirth-print-color);
2599
+ --lightningcss-light: initial;
2600
+ --lightningcss-dark: ;
2601
+ --lightningcss-light: initial;
2602
+ --lightningcss-dark: ;
2603
+ color-scheme: light;
2604
+ --cirth-color: var(--cirth-print-color);
2605
+ --cirth-h1-color: var(--cirth-print-color);
2606
+ --cirth-h2-color: var(--cirth-print-color);
2607
+ --cirth-h3-color: var(--cirth-print-color);
2608
+ --cirth-h4-color: var(--cirth-print-color);
2609
+ --cirth-h5-color: var(--cirth-print-color);
2610
+ --cirth-h6-color: var(--cirth-print-color);
2611
+ --cirth-code-color: var(--cirth-print-color);
2612
+ --cirth-code-kbd-color: var(--cirth-print-color);
2613
+ --cirth-form-element-color: var(--cirth-print-color);
2614
+ --cirth-muted-color: var(--cirth-print-muted-color);
2615
+ --cirth-form-element-placeholder-color: var(--cirth-print-muted-color);
2616
+ --cirth-primary: var(--cirth-print-color);
2617
+ --cirth-primary-hover: var(--cirth-print-color);
2618
+ --cirth-primary-underline: var(--cirth-print-color);
2619
+ --cirth-secondary: var(--cirth-print-color);
2620
+ --cirth-secondary-underline: var(--cirth-print-color);
2621
+ --cirth-contrast: var(--cirth-print-color);
2622
+ --cirth-contrast-underline: var(--cirth-print-color);
2623
+ --cirth-link-visited-color: var(--cirth-print-color);
2624
+ --cirth-muted-border-color: var(--cirth-print-border-color);
2625
+ --cirth-form-element-border-color: var(--cirth-print-border-color);
2626
+ --cirth-box-shadow: none;
2627
+ --cirth-card-box-shadow: none;
2628
+ --cirth-card-background-color: transparent;
2629
+ --cirth-card-sectioning-background-color: transparent;
2630
+ --cirth-code-background-color: transparent;
2631
+ --cirth-code-kbd-background-color: transparent;
2632
+ --cirth-form-element-background-color: transparent;
2633
+ --cirth-form-element-active-background-color: transparent;
2634
+ --cirth-table-row-stripped-background-color: transparent;
2635
+ --cirth-modal-overlay-background-color: transparent;
2636
+ --cirth-ins-color: oklch(35.3% .067 160.59);
2637
+ --cirth-del-color: oklch(35.3% .122 29.73);
2638
+ --cirth-meter-optimum-color: oklch(52.7% .1 160.59);
2639
+ --cirth-meter-suboptimum-color: oklch(48.3% .086 78);
2640
+ --cirth-meter-even-less-good-color: oklch(44% .151 29.73);
2641
+ background: none;
2642
+ }
2643
+
2644
+ .cirth kbd {
2645
+ border: var(--cirth-border-width) solid var(--cirth-print-border-color);
2646
+ }
2647
+
2648
+ .cirth :is(button, [type="submit"], [type="reset"], [type="button"], [role="button"]) {
2649
+ border-color: var(--cirth-print-border-color);
2650
+ box-shadow: none;
2651
+ color: var(--cirth-print-color);
2652
+ background: none;
2653
+ }
2654
+
2655
+ .cirth [type="file"]::file-selector-button {
2656
+ border-color: var(--cirth-print-border-color);
2657
+ box-shadow: none;
2658
+ color: var(--cirth-print-color);
2659
+ background: none;
2660
+ }
2661
+
2662
+ .cirth :is(mark, meter, progress, [type="checkbox"], [type="radio"]) {
2663
+ -webkit-print-color-adjust: exact;
2664
+ print-color-adjust: exact;
2665
+ }
2666
+
2667
+ .cirth a[href^="http"]:not([role="button"], nav a):after {
2668
+ content: " (" attr(href) ")";
2669
+ color: var(--cirth-print-muted-color);
2670
+ font-size: var(--cirth-font-size-sm);
2671
+ word-break: break-all;
2672
+ }
2673
+
2674
+ .cirth thead {
2675
+ display: table-header-group;
2676
+ }
2677
+
2678
+ .cirth tfoot {
2679
+ display: table-footer-group;
2680
+ }
2681
+
2682
+ .cirth tr {
2683
+ break-inside: avoid;
2684
+ }
2685
+
2686
+ .cirth pre {
2687
+ white-space: pre-wrap;
2688
+ overflow: visible;
2689
+ }
2690
+
2691
+ .cirth dialog {
2692
+ -webkit-backdrop-filter: none;
2693
+ backdrop-filter: none;
2694
+ min-width: 0;
2695
+ min-height: 0;
2696
+ position: static;
2697
+ }
2698
+
2699
+ .cirth dialog > article {
2700
+ max-height: none;
2701
+ overflow: visible;
2702
+ }
2703
+
2704
+ .cirth :is(h1, h2, h3, h4, h5, h6) {
2705
+ break-after: avoid;
2706
+ }
2707
+
2708
+ .cirth :is(figure, img) {
2709
+ break-inside: avoid;
2710
+ }
2711
+
2712
+ .cirth :is(blockquote, li, p) {
2713
+ orphans: 3;
2714
+ widows: 3;
2715
+ }
2716
+ }