actual-css 0.11.1 → 0.13.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/CHANGELOG.md +96 -0
- package/README.md +25 -6
- package/components.json +12 -18
- package/dist/actual.full.css +780 -479
- package/dist/actual.full.js +1 -1
- package/dist/actual.full.min.css +1 -1
- package/docs/brand/favicon.svg +5 -0
- package/docs/brand/lockup.svg +12 -0
- package/docs/brand/logo-dark.svg +9 -0
- package/docs/brand/logo-light.svg +9 -0
- package/docs/brand/logo.svg +11 -0
- package/docs/brand/mark.svg +11 -0
- package/docs/design-notes/architecture.md +67 -0
- package/docs/design-notes/steps.md +45 -28
- package/docs/navigation.json +3 -2
- package/docs/pages/components/alert.md +2 -10
- package/docs/pages/components/avatar.md +17 -11
- package/docs/pages/components/badge.md +3 -9
- package/docs/pages/components/breadcrumb.md +16 -2
- package/docs/pages/components/card.md +31 -2
- package/docs/pages/components/dialog.md +121 -33
- package/docs/pages/components/drawer.md +2 -2
- package/docs/pages/components/list.md +9 -13
- package/docs/pages/components/navbar.md +49 -30
- package/docs/pages/components/pagination.md +19 -0
- package/docs/pages/components/steps.md +24 -20
- package/docs/pages/components/table.md +3 -3
- package/docs/pages/enhancements/flyout.md +2 -2
- package/docs/pages/enhancements/scrollspy.md +7 -7
- package/docs/pages/enhancements/status-bar.md +2 -2
- package/docs/pages/enhancements/tabs.md +74 -3
- package/docs/pages/examples/overview.md +2 -1
- package/docs/pages/forms/date-picker.md +90 -0
- package/docs/pages/forms/detached-actions.md +37 -30
- package/docs/pages/forms/floating-field.md +21 -7
- package/docs/pages/forms/form-actions.md +58 -28
- package/docs/pages/forms/input-policy.md +1 -1
- package/docs/pages/forms/overview.md +6 -5
- package/docs/pages/forms/states-and-sizes.md +15 -15
- package/docs/pages/forms/sticky-actions.md +85 -83
- package/docs/pages/forms/validation.md +5 -5
- package/docs/pages/foundations/philosophy.md +102 -4
- package/docs/pages/foundations/theming.md +15 -4
- package/docs/pages/foundations/tokens.md +89 -36
- package/docs/pages/foundations/typography.md +4 -7
- package/docs/pages/guides/bootstrap.md +2 -2
- package/docs/pages/guides/design-tools.md +2 -2
- package/docs/pages/guides/integrating-actual-css.md +79 -9
- package/docs/pages/guides/introduction.md +5 -5
- package/docs/pages/guides/modular-import.md +3 -0
- package/docs/pages/guides/progressive-enhancement.md +27 -9
- package/docs/pages/guides/tailwind.md +70 -0
- package/docs/pages/guides/upgrading.md +151 -0
- package/docs/pages/layout/center.md +2 -1
- package/docs/pages/layout/cluster.md +37 -4
- package/docs/pages/layout/grid.md +2 -0
- package/docs/pages/layout/overview.md +1 -1
- package/docs/pages/layout/sidebar-layout.md +3 -0
- package/docs/pages/layout/stack.md +21 -16
- package/docs/pages/layout/switcher.md +2 -0
- package/docs/pages/layout/topbar.md +7 -5
- package/docs/pages/patterns/icon-slot.md +17 -1
- package/docs/pages/patterns/navigation-list.md +16 -46
- package/docs/pages/patterns/overview.md +3 -4
- package/docs/pages/utilities/flex.md +30 -20
- package/docs/pages/utilities/sizing-wrapping.md +52 -7
- package/docs/pages/utilities/spacing.md +4 -3
- package/package.json +6 -6
- package/reserved-classes.json +3 -3
- package/skills/actual-css/references/enhancements.md +10 -7
- package/src/cli/actual-css.js +39 -13
- package/src/css/components/alert.css +34 -34
- package/src/css/components/avatar.css +8 -17
- package/src/css/components/badge.css +1 -6
- package/src/css/components/breadcrumb.css +74 -8
- package/src/css/components/button.css +3 -9
- package/src/css/components/card.css +18 -10
- package/src/css/components/chat.css +4 -5
- package/src/css/components/drawer.css +42 -45
- package/src/css/components/flyout.css +3 -1
- package/src/css/components/index.css +0 -1
- package/src/css/components/join.css +2 -2
- package/src/css/components/list.css +10 -10
- package/src/css/components/modal.css +113 -134
- package/src/css/components/navbar.css +22 -31
- package/src/css/components/pagination.css +5 -0
- package/src/css/components/scrollspy.css +1 -1
- package/src/css/components/steps.css +66 -12
- package/src/css/components/tab.css +134 -4
- package/src/css/core/base.css +1 -1
- package/src/css/core/focus.css +8 -6
- package/src/css/core/reset.css +2 -1
- package/src/css/core/theme.css +10 -1
- package/src/css/core/tokens.css +32 -12
- package/src/css/core/variants.css +41 -14
- package/src/css/forms/choice-card.css +1 -1
- package/src/css/forms/choice.css +1 -1
- package/src/css/forms/control.css +1 -1
- package/src/css/forms/floating-field.css +20 -18
- package/src/css/forms/form-actions.css +14 -12
- package/src/css/forms/native.css +2 -2
- package/src/css/forms/otp.css +4 -5
- package/src/css/forms/switch.css +1 -1
- package/src/css/forms/validation.css +23 -30
- package/src/css/layout/center.css +2 -0
- package/src/css/layout/cluster.css +25 -0
- package/src/css/layout/grid.css +7 -0
- package/src/css/layout/scroller.css +19 -3
- package/src/css/layout/sidebar-layout.css +3 -0
- package/src/css/layout/switcher.css +3 -0
- package/src/css/layout/topbar.css +12 -6
- package/src/css/utilities/base.css +5 -0
- package/src/css/utilities/extra.css +3 -7
- package/src/js/full.js +4 -0
- package/src/js/inline-visible.js +54 -0
- package/src/js/parsed.js +21 -0
- package/src/js/tab.js +33 -7
- package/src/tooling/color.js +65 -0
- package/src/tooling/design-export.js +1 -1
- package/src/tooling/design-tokens.js +53 -34
- package/src/tooling/theme-contrast.js +217 -0
- package/docs/pages/patterns/actions.md +0 -52
- package/src/css/components/actions.css +0 -27
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><title>Actual</title>
|
|
2
|
+
<rect width="32" height="32" rx="7" fill="#52396F"/>
|
|
3
|
+
<path fill="#F4EFFA" fill-rule="evenodd" d="M10.0,26.5 L27.6,26.5 L18.8,7.5ZM22.7,23.4 L14.9,23.4 L18.8,14.9Z"/>
|
|
4
|
+
<path fill="#C4A8E8" d="M4.4,26.5 L7.6,26.5 L15.7,9.0 L14.1,5.5Z"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-226 -82 7688 1067" width="1922" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<!-- Docs adaptation: fills follow the site theme via --text/--primary, with the
|
|
3
|
+
brand hex as fallback for standalone rendering. The OS-scheme override
|
|
4
|
+
is dropped on purpose: the docs theme picker owns the scheme. -->
|
|
5
|
+
<style>
|
|
6
|
+
.t { fill: var(--text, #52396F); }
|
|
7
|
+
.d { fill: var(--primary, #9B7BCB); }
|
|
8
|
+
</style>
|
|
9
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
10
|
+
<path class="d" d="M-56.0,800.0 L-15.3,800.0 L288.9,140.7 L268.5,96.5Z"/>
|
|
11
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-128 -82 7590 1067" width="1898" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<style>
|
|
3
|
+
.t { fill: #F4EFFA; }
|
|
4
|
+
.d { fill: #B292DB; }
|
|
5
|
+
@media (prefers-color-scheme: dark) { .t { fill: #F4EFFA; } .d { fill: #B292DB; } }
|
|
6
|
+
</style>
|
|
7
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
8
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-128 -82 7590 1067" width="1898" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<style>
|
|
3
|
+
.t { fill: #52396F; }
|
|
4
|
+
.d { fill: #9B7BCB; }
|
|
5
|
+
@media (prefers-color-scheme: dark) { .t { fill: #52396F; } .d { fill: #9B7BCB; } }
|
|
6
|
+
</style>
|
|
7
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
8
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-128 -82 7590 1067" width="1898" height="267" role="img" aria-label="Actual·css"><title>Actual·css</title>
|
|
2
|
+
<!-- Docs adaptation: fills follow the site theme via --text/--primary, with the
|
|
3
|
+
brand hex as fallback for standalone rendering. The OS-scheme override
|
|
4
|
+
is dropped on purpose: the docs theme picker owns the scheme. -->
|
|
5
|
+
<style>
|
|
6
|
+
.t { fill: var(--text, #52396F); }
|
|
7
|
+
.d { fill: var(--primary, #9B7BCB); }
|
|
8
|
+
</style>
|
|
9
|
+
<path class="t" d="M698 800H42L370 89ZM100 763H640L370 177ZM1117 778Q1185 778 1240 751Q1295 724 1326.5 676Q1358 628 1359 568H1395Q1395 637 1358.5 693.5Q1322 750 1258.5 782.5Q1195 815 1117 815Q1041 815 976 777Q911 739 873 674.5Q835 610 835 534V370Q835 294 872.5 229.5Q910 165 974.5 127Q1039 89 1115 89Q1192 89 1255.5 121.5Q1319 154 1356 210.5Q1393 267 1393 336H1357Q1356 276 1324 228Q1292 180 1237.5 153Q1183 126 1115 126Q1049 126 993 159Q937 192 904 248Q871 304 871 370V534Q871 600 904.5 656Q938 712 994.5 745Q1051 778 1117 778ZM2131 104V141H1868V800H1832V141H1569V104ZM2309 104H2346V534Q2346 600 2379 656Q2412 712 2468 745Q2524 778 2590 778Q2656 778 2712 745Q2768 712 2801 656Q2834 600 2834 534V104H2871V534Q2871 610 2833 674.5Q2795 739 2730.5 777Q2666 815 2590 815Q2514 815 2449.5 777Q2385 739 2347 674.5Q2309 610 2309 534ZM3311 104H3350L3636 800H3596L3502 570H3159L3064 800H3025ZM3174 534H3487L3330 152ZM3855 800V104H3892V763H4377V800ZM5557 778Q5625 778 5680 751Q5735 724 5766.5 676Q5798 628 5799 568H5835Q5835 637 5798.5 693.5Q5762 750 5698.5 782.5Q5635 815 5557 815Q5481 815 5416 777Q5351 739 5313 674.5Q5275 610 5275 534V370Q5275 294 5312.5 229.5Q5350 165 5414.5 127Q5479 89 5555 89Q5632 89 5695.5 121.5Q5759 154 5796 210.5Q5833 267 5833 336H5797Q5796 276 5764 228Q5732 180 5677.5 153Q5623 126 5555 126Q5489 126 5433 159Q5377 192 5344 248Q5311 304 5311 370V534Q5311 600 5344.5 656Q5378 712 5434.5 745Q5491 778 5557 778ZM6052 282Q6052 224 6082.5 180Q6113 136 6168.5 112Q6224 88 6297 88Q6367 88 6425.5 117.5Q6484 147 6518 200Q6552 253 6552 321H6515Q6515 262 6486 217Q6457 172 6407 147.5Q6357 123 6296 123Q6242 123 6195 140Q6148 157 6118.5 192Q6089 227 6089 280Q6089 328 6117 356.5Q6145 385 6190 400Q6235 415 6316 432Q6398 449 6443.5 464.5Q6489 480 6520.5 516Q6552 552 6552 617Q6552 682 6517.5 726.5Q6483 771 6426 793Q6369 815 6302 815Q6219 815 6156 784Q6093 753 6059.5 696.5Q6026 640 6026 567H6063Q6063 631 6091.5 679Q6120 727 6174 753.5Q6228 780 6302 780Q6394 780 6454.5 736Q6515 692 6515 616Q6515 564 6489 536Q6463 508 6423.5 495.5Q6384 483 6305 467Q6220 450 6166.5 429.5Q6113 409 6082.5 373.5Q6052 338 6052 282ZM6792 282Q6792 224 6822.5 180Q6853 136 6908.5 112Q6964 88 7037 88Q7107 88 7165.5 117.5Q7224 147 7258 200Q7292 253 7292 321H7255Q7255 262 7226 217Q7197 172 7147 147.5Q7097 123 7036 123Q6982 123 6935 140Q6888 157 6858.5 192Q6829 227 6829 280Q6829 328 6857 356.5Q6885 385 6930 400Q6975 415 7056 432Q7138 449 7183.5 464.5Q7229 480 7260.5 516Q7292 552 7292 617Q7292 682 7257.5 726.5Q7223 771 7166 793Q7109 815 7042 815Q6959 815 6896 784Q6833 753 6799.5 696.5Q6766 640 6766 567H6803Q6803 631 6831.5 679Q6860 727 6914 753.5Q6968 780 7042 780Q7134 780 7194.5 736Q7255 692 7255 616Q7255 564 7229 536Q7203 508 7163.5 495.5Q7124 483 7045 467Q6960 450 6906.5 429.5Q6853 409 6822.5 373.5Q6792 338 6792 282Z"/>
|
|
10
|
+
<path class="d" d="M4810 367Q4848 367 4874.5 393.5Q4901 420 4901 457Q4901 494 4874.5 521Q4848 548 4810 548Q4773 548 4746 521Q4719 494 4719 457Q4719 420 4745.5 393.5Q4772 367 4810 367Z"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>Actual</title>
|
|
2
|
+
<!-- Docs adaptation: fills follow the site theme via --text/--primary, with the
|
|
3
|
+
brand hex as fallback for standalone rendering. The OS-scheme override
|
|
4
|
+
is dropped on purpose: the docs theme picker owns the scheme. -->
|
|
5
|
+
<style>
|
|
6
|
+
.ring { fill: var(--text, #52396F); }
|
|
7
|
+
.bar { fill: var(--primary, #9B7BCB); }
|
|
8
|
+
</style>
|
|
9
|
+
<path class="ring" fill-rule="evenodd" d="M124.7,451.9 L475.4,451.9 L300.1,71.9ZM406.6,407.9 L193.5,407.9 L300.1,177.0Z"/>
|
|
10
|
+
<path class="bar" d="M36.6,451.9 L85.1,451.9 L241.7,112.6 L217.4,60.1Z"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
How to decide what belongs in Actual, and where. The rules an application
|
|
4
|
+
author follows are in [Philosophy](../pages/foundations/philosophy.md) and
|
|
5
|
+
[Building with Actual CSS](../pages/guides/integrating-actual-css.md); naming is
|
|
6
|
+
in [Naming conventions](naming.md), behavior in
|
|
7
|
+
[Enhancement contract](enhancement-contract.md).
|
|
8
|
+
|
|
9
|
+
The test for where a rule goes: if it changes how someone writes their
|
|
10
|
+
application CSS, it belongs in the guide; if it only decides how Actual is
|
|
11
|
+
built, it belongs here.
|
|
12
|
+
|
|
13
|
+
## Ownership
|
|
14
|
+
|
|
15
|
+
- **A component owns its intrinsic anatomy, not page composition.** Padding,
|
|
16
|
+
surface, slots and states are the component's; outer margins and sibling
|
|
17
|
+
spacing are not.
|
|
18
|
+
- **A layout primitive on a component replaces its default layout without
|
|
19
|
+
specificity tricks.** The component's own box layout sits in `:where()`
|
|
20
|
+
(`.card`, its header and footer slots). `components/` loads after `layout/`,
|
|
21
|
+
so a plain class declaration would win on source order and flatten
|
|
22
|
+
`class="card media"` into a column.
|
|
23
|
+
- **Structural anatomy never lends a class's weight to a bare element.**
|
|
24
|
+
`:where(dialog).modal > :where(form, .stack)`, not `> :is(form, .stack)`,
|
|
25
|
+
which would give `<form>` the specificity of `.stack`.
|
|
26
|
+
|
|
27
|
+
## Utilities
|
|
28
|
+
|
|
29
|
+
A utility makes one reusable adjustment. A class that sets a surface, a border,
|
|
30
|
+
padding and type together has become a component, whatever file it lives in.
|
|
31
|
+
|
|
32
|
+
## Abstraction
|
|
33
|
+
|
|
34
|
+
- **Duplication beats an abstraction that couples unrelated components.** Every
|
|
35
|
+
file under `components/` is a public export (`actual-css/css/components/*`).
|
|
36
|
+
A shared file imported only by the index would break a single-component
|
|
37
|
+
import, so `.modal` and `.drawer` each keep the declarations they share.
|
|
38
|
+
- **No generic primitive because two examples look alike.** A primitive names a
|
|
39
|
+
relationship that recurs across unrelated applications. When the existing
|
|
40
|
+
answer was hard to find, improve the docs instead.
|
|
41
|
+
- **Bytes do not justify specificity.** A selector is not merged or raised to
|
|
42
|
+
save a few compressed bytes when it changes who can override it.
|
|
43
|
+
|
|
44
|
+
## Tokens
|
|
45
|
+
|
|
46
|
+
A value derived from an overridable token is computed on the element that uses
|
|
47
|
+
it, never as an alias on `:root`: an inherited custom property arrives already
|
|
48
|
+
computed, so an override on a theme island or a region would not reach it. The
|
|
49
|
+
generic focus line (`focus.css`) and the dialog and drawer focus reserves
|
|
50
|
+
follow this rule.
|
|
51
|
+
|
|
52
|
+
## Decoration
|
|
53
|
+
|
|
54
|
+
A decorative cue must not dictate geometry, focus or scroll behavior. Scrolling
|
|
55
|
+
strips have no shared edge fade: its mask set their scroll-padding and focus
|
|
56
|
+
reserve, and repeated what a clipped item and the scrollbar already show. The
|
|
57
|
+
strips reserve only their focus line. `.tabs` is the exception: it hides its
|
|
58
|
+
scrollbar, so its fade is the cue, and the fade spans the strip's existing
|
|
59
|
+
scroll-padding instead of setting it.
|
|
60
|
+
|
|
61
|
+
Starting a strip on its current item is a progressive enhancement, not a
|
|
62
|
+
contract: `scroll-initial-target` on the item, no runtime. One declaration
|
|
63
|
+
replaces a module, its opt-in token and its wait for parsing. Engines without
|
|
64
|
+
the property start at the first item, which the fade or the scrollbar already
|
|
65
|
+
says is not all; do not reintroduce a script fallback for them. `.pagination` does not scroll at all: it wraps, because a
|
|
66
|
+
click on a page navigates instead of moving the strip, so a scrolling row hid
|
|
67
|
+
pages the mouse could not reach.
|
|
@@ -82,7 +82,7 @@ and upcoming is the absence of both, because the platform already spells those.
|
|
|
82
82
|
|
|
83
83
|
Out of contract — a step name belongs in a `.step-label` — and it degrades in
|
|
84
84
|
the right direction. `:empty` reads an item's own content, so `<li>Account</li>`
|
|
85
|
-
is not empty: it takes the
|
|
85
|
+
is not empty: it takes the same authored item floor as a wrapped label, and only the
|
|
86
86
|
placing and aligning that `.step-label` rules provide are missing. It lays out
|
|
87
87
|
and does not fall apart, which is all an out-of-contract markup is owed.
|
|
88
88
|
|
|
@@ -90,11 +90,8 @@ This is the case that makes bare text expensive to support as a first-class
|
|
|
90
90
|
form, and it is worth stating precisely, because a component that sizes steps
|
|
91
91
|
*per label* pays for it twice.
|
|
92
92
|
|
|
93
|
-
In behaviour:
|
|
94
|
-
wrapped
|
|
95
|
-
holds 201px while its four peers shrink to 89px. That skew is what
|
|
96
|
-
`> li:has(.step-label)` produces — bare text has no label, so it takes a
|
|
97
|
-
marker-wide floor while its wrapped peers keep `--step-min`.
|
|
93
|
+
In behaviour: sizing by `> li:has(.step-label)` would give bare text and
|
|
94
|
+
wrapped labels different floors whenever an author sets `--step-min`.
|
|
98
95
|
|
|
99
96
|
In bytes: the only valid way to express "every step is wrapped" is to enumerate
|
|
100
97
|
positions (see "`:has()` cannot be nested"), which grows the selector for each
|
|
@@ -105,7 +102,7 @@ supported count.
|
|
|
105
102
|
a link and bare text.
|
|
106
103
|
|
|
107
104
|
The row-level alternative, `.steps-horizontal:not(:has(.step-label)) > li`,
|
|
108
|
-
avoids the skew differently: it
|
|
105
|
+
avoids the skew differently: it gives every step the authored floor, so an empty
|
|
109
106
|
step in a mixed row becomes a wide gap rather than a marker. It also puts the
|
|
110
107
|
compact form itself behind `:has()`, above the Degraded tier, for a shape that
|
|
111
108
|
needs no modern selector at all.
|
|
@@ -156,6 +153,32 @@ stay in the stacked layout.
|
|
|
156
153
|
property, so overriding `--step-min` moves the scroll budget but not this
|
|
157
154
|
query. Same trade as `--grid-min` in `grid.css`.
|
|
158
155
|
|
|
156
|
+
## Even marker pitch and wrapping labels
|
|
157
|
+
|
|
158
|
+
Stacked labelled steps keep an even marker pitch because each outgoing
|
|
159
|
+
connector must reach the next marker's edge. Intrinsic per-label widths would
|
|
160
|
+
move the markers unevenly and make that length depend on a neighbour's width.
|
|
161
|
+
|
|
162
|
+
The first and last markers align with the row's edges at every width. Each
|
|
163
|
+
end cell takes half a normal share plus half a marker; simply moving the marker
|
|
164
|
+
inside a full cell would stretch the outer connectors. Labels follow the same
|
|
165
|
+
start/end alignment, while the middle steps remain centred. The first connector
|
|
166
|
+
crosses two end-cell widths minus both markers, plus the intervening gap.
|
|
167
|
+
|
|
168
|
+
It is not behind a viewport query. Edge alignment is the row's geometry, the
|
|
169
|
+
one the compact and inline forms already have, and a breakpoint on the viewport
|
|
170
|
+
would lay out the same 600px row differently on a phone and in a desktop card.
|
|
171
|
+
|
|
172
|
+
The marker sets the default item floor. A `minmax(0, 1fr)` grid column keeps a
|
|
173
|
+
long label from widening its step; `hyphens: auto` breaks a long word where the
|
|
174
|
+
page's `lang` allows, and `overflow-wrap: anywhere` still lets an unbroken name
|
|
175
|
+
fit when it does not. `--step-gap` separates both the marker from its label and
|
|
176
|
+
one step from the next, so wrapped names cannot run together.
|
|
177
|
+
|
|
178
|
+
Authors can raise `--step-min` when wrapping costs too much height. The row
|
|
179
|
+
then scrolls once those floors and the intervening gaps outgrow its region.
|
|
180
|
+
This budget changes neither orientation nor the wide inline threshold.
|
|
181
|
+
|
|
159
182
|
## The compact form
|
|
160
183
|
|
|
161
184
|
The whole unlabelled contract, in both orientations:
|
|
@@ -235,8 +258,7 @@ having no share to fill — is only as wide as its own marker.
|
|
|
235
258
|
|
|
236
259
|
The result is a track flush with both ends of the row, which is what lets it
|
|
237
260
|
line up with the heading or paragraph that names the step. Keeping the centred
|
|
238
|
-
geometry leaves half-cell margins at both ends
|
|
239
|
-
a 736px row, 60px of dead space on each side, with the first marker floating
|
|
261
|
+
geometry leaves half-cell margins at both ends, with the first marker floating
|
|
240
262
|
inward of a left-aligned heading.
|
|
241
263
|
|
|
242
264
|
It also matches the inline representation, whose `:last-child { flex: 0 0 auto }`
|
|
@@ -244,7 +266,7 @@ is the same declaration for the same reason.
|
|
|
244
266
|
|
|
245
267
|
The connector follows from the alignment rather than being tuned to it. The
|
|
246
268
|
base geometry starts a connector at `50% + --step-size / 2` — the right edge of
|
|
247
|
-
a centred marker — and runs it `100% - --step-size`, to the next marker's left
|
|
269
|
+
a centred marker — and runs it `100% - --step-size + --step-gap`, to the next marker's left
|
|
248
270
|
edge. Move the marker to the start of the share and that origin becomes
|
|
249
271
|
`--step-size`; the width is unchanged, and the connector still lands exactly on
|
|
250
272
|
the next marker. Measured at 736px and at 200px: zero gap either side.
|
|
@@ -265,7 +287,7 @@ leave in a component whose whole claim is that sizing follows content.
|
|
|
265
287
|
### Why `:empty` rather than `:has()`
|
|
266
288
|
|
|
267
289
|
It says what the markup says, and it reads the item's own content, which is
|
|
268
|
-
what keeps bare text
|
|
290
|
+
what keeps bare text on the same authored floor as labelled peers (see "Bare text in an `<li>`").
|
|
269
291
|
|
|
270
292
|
It also predates `:has()` by a decade, so the compact form reaches the Degraded
|
|
271
293
|
tier. `:has(.step-label)` appears only in the wide container query, where
|
|
@@ -412,7 +434,7 @@ The contract is one sentence. A step label may be a link, a marker never is, and
|
|
|
412
434
|
anything else focusable in a step is out of contract.
|
|
413
435
|
|
|
414
436
|
The one `:has(a[href])` in the file is unrelated: a navigable row reserves
|
|
415
|
-
|
|
437
|
+
padding on both axes for its focus ring, because the scroll container clips at the
|
|
416
438
|
padding edge. See "Scrolling on one axis".
|
|
417
439
|
|
|
418
440
|
A link needs no styling rule of its own to go with it. `color: inherit` sits in
|
|
@@ -442,13 +464,9 @@ with `.sr-only` on `.step-label`, so the text stays in the accessibility tree
|
|
|
442
464
|
while its box disappears. Or the same rules behind a public class, so the author
|
|
443
465
|
picks the representation instead of a width picking it.
|
|
444
466
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
steps share that threshold rather than getting their own at 28rem, so between
|
|
449
|
-
448px and 560px they compact although stacked would still fit; splitting the
|
|
450
|
-
difference at 32rem is worse, handing five-step rows a scrolling band instead
|
|
451
|
-
(40px of overflow at 520px, 20px at 540px).
|
|
467
|
+
A fixed hiding threshold cannot reflect the authored item floor or the actual
|
|
468
|
+
length of a label. Wrapping uses the available share directly, without removing
|
|
469
|
+
content or introducing a per-count breakpoint.
|
|
452
470
|
|
|
453
471
|
### Why the premise fails
|
|
454
472
|
|
|
@@ -469,7 +487,7 @@ So the question is not "how narrow before labels must go?" but "does this
|
|
|
469
487
|
sequence carry names at all?", and that one is the author's to answer in
|
|
470
488
|
markup. An unlabelled sequence is compact because it has nothing to show; a
|
|
471
489
|
labelled one keeps everything it was given. When a labelled row does not fit,
|
|
472
|
-
the
|
|
490
|
+
the available answers are wrapping, scrolling, more space, or `.steps-vertical`.
|
|
473
491
|
|
|
474
492
|
### What the rule is worth, concretely
|
|
475
493
|
|
|
@@ -611,7 +629,7 @@ retuning surface is `--scroller-thumb` and `--scroller-track`, which belong to
|
|
|
611
629
|
`.scroller`. Copying those into Steps duplicates the primitive; omitting them
|
|
612
630
|
leaves a scrollbar no documented hook reaches.
|
|
613
631
|
|
|
614
|
-
Measured on a five-step row in a 380px region, the pairing takes the scrollbar
|
|
632
|
+
Measured on a five-step row with an authored `--step-min: 7rem` in a 380px region, the pairing takes the scrollbar
|
|
615
633
|
from 15px to 10px and the row from 69px to 64px, with the thumb on
|
|
616
634
|
`--text-muted` instead of the OS grey.
|
|
617
635
|
|
|
@@ -620,19 +638,18 @@ Its `.stable-gutter` variant, on the other hand, is a trap worth naming.
|
|
|
620
638
|
scrollbar — and this row sets `overflow-y: hidden`, so there is never one to
|
|
621
639
|
reserve for. It does not steady the row's height across the appearance of the
|
|
622
640
|
horizontal scrollbar, which is what an author would reach for it to do:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
overflow from 36px to 46px. Strictly worse in both directions.
|
|
641
|
+
the reserved inline gutter narrows the row without reserving space for a
|
|
642
|
+
horizontal scrollbar, making horizontal overflow more likely.
|
|
626
643
|
|
|
627
644
|
What makes the row scroll rather than squash is the item floor:
|
|
628
645
|
`min-inline-size: max(var(--step-size), var(--step-min))`. The `max()` is there
|
|
629
|
-
so an author who lowers `--step-min` below `--step-size`
|
|
630
|
-
|
|
646
|
+
so an author who lowers `--step-min` below `--step-size` cannot collapse items
|
|
647
|
+
behind their own markers.
|
|
631
648
|
|
|
632
649
|
The cost of scrolling is that clipping happens at the padding edge, and a focus
|
|
633
|
-
ring is drawn outside its element's border box —
|
|
650
|
+
ring is drawn outside its element's border box — the generic outline is
|
|
634
651
|
`--focus-ring-width` wide at `--focus-outline-offset`, so 4px past a label that sits
|
|
635
|
-
flush with the
|
|
652
|
+
flush with the edge of a stacked row. A navigable row therefore reserves
|
|
636
653
|
exactly that much `padding-block`, gated on `.steps-horizontal:has(a[href])`. An
|
|
637
654
|
informational stepper — the common case, with no ring to protect — keeps its
|
|
638
655
|
height, and so does a navigable column: the padding is compensation for the
|
package/docs/navigation.json
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"progressive-enhancement",
|
|
11
11
|
"bootstrap",
|
|
12
12
|
"tailwind",
|
|
13
|
-
"design-tools"
|
|
13
|
+
"design-tools",
|
|
14
|
+
"upgrading"
|
|
14
15
|
]
|
|
15
16
|
},
|
|
16
17
|
{
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"overview",
|
|
83
84
|
"controls",
|
|
84
85
|
"combobox",
|
|
86
|
+
"date-picker",
|
|
85
87
|
"rich-text",
|
|
86
88
|
"labels",
|
|
87
89
|
"floating-field",
|
|
@@ -104,7 +106,6 @@
|
|
|
104
106
|
"slug": "patterns",
|
|
105
107
|
"pages": [
|
|
106
108
|
"overview",
|
|
107
|
-
"actions",
|
|
108
109
|
"navigation-list",
|
|
109
110
|
"icon-input",
|
|
110
111
|
"icon-slot",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- Supports longer text and lists.
|
|
7
7
|
- Links inherit alert color by default.
|
|
8
8
|
- Alerts are soft by default. Use `.surface` for neutral chrome with the intent only in the ink, `.solid` or `.outline` when the message needs stronger or quieter emphasis.
|
|
9
|
-
- Use `<menu class="
|
|
9
|
+
- Use `<menu class="cluster">` for alert action lists.
|
|
10
10
|
- Use `role="alert"` only when the alert is injected dynamically and should be announced.
|
|
11
11
|
- Not a toast.
|
|
12
12
|
- Could have simple or complex html content.
|
|
@@ -90,7 +90,7 @@ intent treatment when the color itself carries the meaning.
|
|
|
90
90
|
<p>Check your billing details or try another card.</p>
|
|
91
91
|
</div>
|
|
92
92
|
|
|
93
|
-
<menu class="
|
|
93
|
+
<menu class="cluster">
|
|
94
94
|
<li><a class="btn danger sm" href="/billing">Update billing</a></li>
|
|
95
95
|
<li><a href="/support">Contact support</a></li>
|
|
96
96
|
</menu>
|
|
@@ -128,14 +128,6 @@ center.
|
|
|
128
128
|
I'm a surface alert — theme chrome, intent in the ink
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
|
-
<div class="alert danger compact" role="alert">
|
|
132
|
-
I'm an error in a compact context
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div class="alert danger spacious" role="alert">
|
|
136
|
-
I'm an error in a spacious context
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
131
|
<div class="alert danger outline" role="alert">
|
|
140
132
|
I'm an outline error <a href="#">with a link</a>
|
|
141
133
|
</div>
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
## Class reference
|
|
14
14
|
|
|
15
|
-
| Class | Kind | Description
|
|
16
|
-
| --------------- | ----------- |
|
|
17
|
-
| `.avatar` | Component | Initials or image in a circular box.
|
|
18
|
-
| `.avatar-stack` | Composition | Overlapping avatar group.
|
|
19
|
-
| `.badge:empty` | Composition | Status dot, at the bottom-end corner.
|
|
20
|
-
| `.sm` / `.lg` | Size | Optical size
|
|
15
|
+
| Class | Kind | Description |
|
|
16
|
+
| --------------- | ----------- | -------------------------------------- |
|
|
17
|
+
| `.avatar` | Component | Initials or image in a circular box. |
|
|
18
|
+
| `.avatar-stack` | Composition | Overlapping avatar group. |
|
|
19
|
+
| `.badge:empty` | Composition | Status dot, at the bottom-end corner. |
|
|
20
|
+
| `.sm` / `.lg` | Size | Optical size, on an avatar or a stack. |
|
|
21
21
|
|
|
22
22
|
`.avatar` works on `div`, `a` and `button`. The status dot is an empty
|
|
23
23
|
`.badge` inside an `.avatar`, and needs an `aria-label` of its own.
|
|
@@ -79,6 +79,9 @@ is suppressed inside the avatar.
|
|
|
79
79
|
|
|
80
80
|
## Avatar stack
|
|
81
81
|
|
|
82
|
+
Set `.sm` or `.lg` on `.avatar-stack` to size the group; its avatars inherit
|
|
83
|
+
that size without their own size classes. Child sizes do not resize the stack.
|
|
84
|
+
|
|
82
85
|
```html demo
|
|
83
86
|
<div class="avatar-stack" role="group" aria-label="Team members">
|
|
84
87
|
<div class="avatar" role="img" aria-label="John Doe" style="--avatar-bg:#E5EEE4">
|
|
@@ -93,16 +96,19 @@ is suppressed inside the avatar.
|
|
|
93
96
|
</div>
|
|
94
97
|
```
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
### Hooks
|
|
97
100
|
|
|
98
101
|
- `--avatar-size` — inline and block size.
|
|
99
102
|
- `--avatar-radius` — corner radius; set a smaller value for squared avatars.
|
|
103
|
+
- `--avatar-font-size` — initials size.
|
|
100
104
|
- `--avatar-bg` — background; `data-tone` adjusts the derived foreground.
|
|
101
105
|
- `--avatar-stack-size` — stack-scoped size that each avatar falls back to.
|
|
106
|
+
- `--avatar-stack-font-size` — stack-scoped initials size, paired with `--avatar-stack-size`.
|
|
102
107
|
- `--avatar-stack-overlap` — how far stacked avatars overlap.
|
|
103
108
|
- `--avatar-stack-ring` — separating ring width inside `.avatar-stack`.
|
|
104
109
|
|
|
105
|
-
Prefer intents for avatar colors. Inside `.avatar-stack`, `--avatar-size`
|
|
106
|
-
back to
|
|
107
|
-
set `--avatar-size` on an
|
|
108
|
-
`--avatar-stack-overlap` is derived from
|
|
110
|
+
Prefer intents for avatar colors. Inside `.avatar-stack`, `--avatar-size` and
|
|
111
|
+
`--avatar-font-size` fall back to the stack-scoped pair, which `.sm`/`.lg` on
|
|
112
|
+
the stack set, so the whole group resizes together; set `--avatar-size` on an
|
|
113
|
+
individual avatar to opt one out. `--avatar-stack-overlap` is derived from
|
|
114
|
+
`--avatar-stack-size`, not `--avatar-size`.
|
|
@@ -126,15 +126,9 @@ Regular
|
|
|
126
126
|
<span class="badge success lg">Large</span>
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```html demo
|
|
134
|
-
<span class="compact"><span class="badge success">Compact</span></span>
|
|
135
|
-
<span><span class="badge success">Default</span></span>
|
|
136
|
-
<span class="spacious"><span class="badge success">Spacious</span></span>
|
|
137
|
-
```
|
|
129
|
+
A badge keeps its size inside a `.compact` or `.spacious` context: its
|
|
130
|
+
geometry is intrinsic to its label. Use `.sm` / `.lg` for a smaller or larger
|
|
131
|
+
badge.
|
|
138
132
|
|
|
139
133
|
## With an icon
|
|
140
134
|
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
- Use a semantic `<nav>` landmark.
|
|
6
6
|
- Put `.breadcrumb` on the ordered list.
|
|
7
|
-
- Use `aria-current="page"` for the current page
|
|
8
|
-
|
|
7
|
+
- Use `aria-current="page"` for the current page, on its link or on its `<li>`,
|
|
8
|
+
and keep it last.
|
|
9
|
+
- Separators are generated with CSS (`> li + li::before`).
|
|
10
|
+
- Put each ancestor label in an `<a>` or a `<span>`: that box carries the
|
|
11
|
+
ellipsis. The current page may be bare text in an `<li aria-current="page">`.
|
|
9
12
|
|
|
10
13
|
```html demo
|
|
11
14
|
<nav aria-label="Breadcrumb">
|
|
@@ -17,3 +20,14 @@
|
|
|
17
20
|
</ol>
|
|
18
21
|
</nav>
|
|
19
22
|
```
|
|
23
|
+
|
|
24
|
+
## Narrow space
|
|
25
|
+
|
|
26
|
+
A trail stays on one line and never scrolls. When it does not fit, labels
|
|
27
|
+
truncate with an ellipsis: ancestors first, down to a couple of characters
|
|
28
|
+
each, then the current page. A link keeps its full text as its accessible
|
|
29
|
+
name; add a `title` if pointer users should see it on hover.
|
|
30
|
+
|
|
31
|
+
Truncation does not remove levels. For a deep hierarchy on a phone, collapse
|
|
32
|
+
it in markup — keep the root and the current page, and replace the middle
|
|
33
|
+
levels with a `…` item, or render only a link to the parent page.
|
|
@@ -39,7 +39,7 @@ gap.
|
|
|
39
39
|
|
|
40
40
|
<p>Using the right HTML tags improves both SEO and accessibility. Lean on landmarks and live lists.</p>
|
|
41
41
|
|
|
42
|
-
<ul class="cluster
|
|
42
|
+
<ul class="cluster tight" aria-label="Tags">
|
|
43
43
|
<li><span class="badge primary soft secondary">HTML</span></li>
|
|
44
44
|
<li><span class="badge soft primary">Accessibility</span></li>
|
|
45
45
|
<li><span class="badge outline">5 min read</span></li>
|
|
@@ -53,6 +53,34 @@ gap.
|
|
|
53
53
|
</div>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
## Slot rows
|
|
57
|
+
|
|
58
|
+
A direct `<header>` or `<footer>` is a wrapping split row by default: title and
|
|
59
|
+
badge, date and action, one left one right. A primitive, role or utility on the
|
|
60
|
+
slot replaces that row — `.media` for an avatar beside a title, `.cluster` for a
|
|
61
|
+
start-aligned group, `cluster form-actions` for a form's action row,
|
|
62
|
+
`.justify-content-end` to push actions right. The footer stays anchored to the
|
|
63
|
+
bottom either way.
|
|
64
|
+
|
|
65
|
+
```html demo
|
|
66
|
+
<div style="max-inline-size: 32rem">
|
|
67
|
+
<article class="card">
|
|
68
|
+
<header class="media">
|
|
69
|
+
<span class="avatar"><abbr>AM</abbr></span>
|
|
70
|
+
<hgroup>
|
|
71
|
+
<h3>Ada Meridian</h3>
|
|
72
|
+
<p class="muted">Design systems</p>
|
|
73
|
+
</hgroup>
|
|
74
|
+
</header>
|
|
75
|
+
<p>Reviews every token change before it ships.</p>
|
|
76
|
+
<footer class="cluster justify-content-end">
|
|
77
|
+
<button type="button" class="btn ghost">Dismiss</button>
|
|
78
|
+
<button type="button" class="btn primary">Follow</button>
|
|
79
|
+
</footer>
|
|
80
|
+
</article>
|
|
81
|
+
</div>
|
|
82
|
+
```
|
|
83
|
+
|
|
56
84
|
## Bleed
|
|
57
85
|
|
|
58
86
|
Use `.bleed` on a direct child to bring an image or band to the card edge. See
|
|
@@ -155,4 +183,5 @@ treatments on either side of it.
|
|
|
155
183
|
- `--card-radius` — corner radius.
|
|
156
184
|
- `--card-max-inline-size` — maximum width.
|
|
157
185
|
- `--card-pad` — inner padding, relayed to direct children for `.bleed`. `.compact` lowers it.
|
|
158
|
-
- `--card-gap` — space between direct children of a bare card. A composed layout primitive owns its own gap instead.
|
|
186
|
+
- `--card-gap` — space between direct children of a bare card. `.compact` lowers it; a parent's `--gap` and an inherited density do not reach it. A composed layout primitive owns its own gap instead.
|
|
187
|
+
- `--items-align` — cross-axis alignment of the slot rows, set by the `.items-*` helpers on the card or the slot.
|