@voidable/theme 0.8.1 → 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.
Files changed (105) hide show
  1. package/dist/components/accordion.css +12 -8
  2. package/dist/components/accordion.min.css +1 -1
  3. package/dist/components/action-input.css +30 -21
  4. package/dist/components/action-input.min.css +1 -1
  5. package/dist/components/alert.css +7 -7
  6. package/dist/components/alert.min.css +1 -1
  7. package/dist/components/banner.css +7 -7
  8. package/dist/components/banner.min.css +1 -1
  9. package/dist/components/breadcrumbs.css +7 -7
  10. package/dist/components/breadcrumbs.min.css +1 -1
  11. package/dist/components/calendar.css +7 -4
  12. package/dist/components/calendar.min.css +1 -1
  13. package/dist/components/card.css +15 -15
  14. package/dist/components/card.min.css +1 -1
  15. package/dist/components/carousel.css +16 -8
  16. package/dist/components/carousel.min.css +1 -1
  17. package/dist/components/collapsible.css +8 -8
  18. package/dist/components/collapsible.min.css +1 -1
  19. package/dist/components/color-picker.css +1 -1
  20. package/dist/components/color-picker.min.css +1 -1
  21. package/dist/components/combobox.css +7 -7
  22. package/dist/components/combobox.min.css +1 -1
  23. package/dist/components/dialog.css +9 -8
  24. package/dist/components/dialog.min.css +1 -1
  25. package/dist/components/drawer.css +52 -15
  26. package/dist/components/drawer.min.css +1 -1
  27. package/dist/components/dropdown-menu.css +7 -7
  28. package/dist/components/dropdown-menu.min.css +1 -1
  29. package/dist/components/error-fallback.css +7 -7
  30. package/dist/components/error-fallback.min.css +1 -1
  31. package/dist/components/hover-card.css +7 -7
  32. package/dist/components/hover-card.min.css +1 -1
  33. package/dist/components/list.css +7 -7
  34. package/dist/components/list.min.css +1 -1
  35. package/dist/components/menu.css +7 -7
  36. package/dist/components/menu.min.css +1 -1
  37. package/dist/components/multiselect.css +7 -7
  38. package/dist/components/multiselect.min.css +1 -1
  39. package/dist/components/nav-menu.css +18 -15
  40. package/dist/components/nav-menu.min.css +1 -1
  41. package/dist/components/number-input.css +10 -10
  42. package/dist/components/number-input.min.css +1 -1
  43. package/dist/components/panel.css +7 -7
  44. package/dist/components/panel.min.css +1 -1
  45. package/dist/components/popover.css +7 -7
  46. package/dist/components/popover.min.css +1 -1
  47. package/dist/components/progress.css +6 -2
  48. package/dist/components/progress.min.css +1 -1
  49. package/dist/components/segmented-control.css +7 -7
  50. package/dist/components/segmented-control.min.css +1 -1
  51. package/dist/components/select.css +2 -2
  52. package/dist/components/select.min.css +1 -1
  53. package/dist/components/sidebar.css +4 -4
  54. package/dist/components/sidebar.min.css +1 -1
  55. package/dist/components/slider.css +13 -1
  56. package/dist/components/slider.min.css +1 -1
  57. package/dist/components/switch.css +8 -4
  58. package/dist/components/switch.min.css +1 -1
  59. package/dist/components/table.css +1 -1
  60. package/dist/components/table.min.css +1 -1
  61. package/dist/components/tabs.css +12 -7
  62. package/dist/components/tabs.min.css +1 -1
  63. package/dist/components/toast.css +15 -13
  64. package/dist/components/toast.min.css +1 -1
  65. package/dist/components/tooltip.css +7 -7
  66. package/dist/components/tooltip.min.css +1 -1
  67. package/dist/core.css +190 -88
  68. package/dist/core.min.css +1 -1
  69. package/dist/patterns/app-shell.css +1 -1
  70. package/dist/patterns/app-shell.min.css +1 -1
  71. package/dist/patterns/media.css +19 -9
  72. package/dist/patterns/media.min.css +1 -1
  73. package/dist/patterns/shell.css +7 -7
  74. package/dist/patterns/shell.min.css +1 -1
  75. package/dist/reset.css +8 -8
  76. package/dist/reset.min.css +1 -1
  77. package/dist/void.css +190 -88
  78. package/dist/void.min.css +1 -1
  79. package/package.json +1 -1
  80. package/src/app-shell/subtable.css +1 -1
  81. package/src/components/accordion.css +6 -1
  82. package/src/components/action-input.css +29 -17
  83. package/src/components/calendar.css +7 -4
  84. package/src/components/card.css +8 -8
  85. package/src/components/carousel.css +8 -1
  86. package/src/components/collapsible.css +1 -1
  87. package/src/components/color-picker.css +3 -3
  88. package/src/components/dialog.css +2 -1
  89. package/src/components/drawer.css +35 -9
  90. package/src/components/indicator.css +2 -0
  91. package/src/components/nav-menu.css +10 -7
  92. package/src/components/number-input.css +13 -13
  93. package/src/components/overlay.css +1 -1
  94. package/src/components/progress.css +4 -2
  95. package/src/components/select.css +2 -2
  96. package/src/components/sidebar.css +6 -4
  97. package/src/components/slider.css +10 -1
  98. package/src/components/stepper.css +1 -1
  99. package/src/components/switch.css +7 -4
  100. package/src/components/table.css +1 -1
  101. package/src/components/tabs.css +6 -0
  102. package/src/components/toast.css +15 -6
  103. package/src/forced-colors.css +8 -0
  104. package/src/media/media.css +13 -2
  105. package/src/reset.css +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidable/theme",
3
- "version": "0.8.1",
3
+ "version": "0.10.0",
4
4
  "description": "CSS custom properties, design tokens, reset and component styles for Voidable UI",
5
5
  "keywords": [
6
6
  "css",
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  .subtable th {
31
- text-align: left;
31
+ text-align: start;
32
32
  padding: var(--void-space-2) var(--void-space-3);
33
33
  font-family: var(--void-type-label-family);
34
34
  font-size: var(--void-type-label-size);
@@ -35,7 +35,7 @@ void-accordion-trigger {
35
35
  font-family: var(--void-font-sans);
36
36
  font-size: var(--void-text-base);
37
37
  font-weight: var(--void-weight-medium);
38
- text-align: left;
38
+ text-align: start;
39
39
  cursor: pointer;
40
40
  user-select: none;
41
41
  outline: none;
@@ -62,6 +62,11 @@ void-accordion-trigger:focus-visible {
62
62
  outline-offset: calc(var(--void-focus-ring-width) * -1);
63
63
  }
64
64
 
65
+ /* The closed chevron points the way the text reads on, so it mirrors in RTL. */
66
+ void-accordion-trigger:dir(rtl)::after {
67
+ scale: -1 1;
68
+ }
69
+
65
70
  void-accordion-item[open] > void-accordion-trigger::after {
66
71
  transform: rotate(90deg);
67
72
  }
@@ -34,19 +34,31 @@ void-action-input:hover:not(:focus-within) {
34
34
 
35
35
  /* Border-radius on children (no overflow:hidden so tooltip can escape) */
36
36
  void-action-input input.void-action-input-field {
37
- border-radius: var(--void-control-radius) 0 0 var(--void-control-radius);
37
+ border-start-start-radius: var(--void-control-radius);
38
+ border-end-start-radius: var(--void-control-radius);
39
+ border-start-end-radius: 0;
40
+ border-end-end-radius: 0;
38
41
  }
39
42
 
40
43
  void-action-input .void-action-input-btn {
41
- border-radius: 0 var(--void-control-radius) var(--void-control-radius) 0;
44
+ border-start-start-radius: 0;
45
+ border-end-start-radius: 0;
46
+ border-start-end-radius: var(--void-control-radius);
47
+ border-end-end-radius: var(--void-control-radius);
42
48
  }
43
49
 
44
- void-action-input[icon-side="left"] input.void-action-input-field {
45
- border-radius: 0 var(--void-control-radius) var(--void-control-radius) 0;
50
+ void-action-input[icon-side="start"] input.void-action-input-field {
51
+ border-start-start-radius: 0;
52
+ border-end-start-radius: 0;
53
+ border-start-end-radius: var(--void-control-radius);
54
+ border-end-end-radius: var(--void-control-radius);
46
55
  }
47
56
 
48
- void-action-input[icon-side="left"] .void-action-input-btn {
49
- border-radius: var(--void-control-radius) 0 0 var(--void-control-radius);
57
+ void-action-input[icon-side="start"] .void-action-input-btn {
58
+ border-start-start-radius: var(--void-control-radius);
59
+ border-end-start-radius: var(--void-control-radius);
60
+ border-start-end-radius: 0;
61
+ border-end-end-radius: 0;
50
62
  }
51
63
 
52
64
  /* The native input inside */
@@ -61,7 +73,7 @@ void-action-input input.void-action-input-field {
61
73
  font-size: var(--_void-field-text);
62
74
  line-height: var(--void-leading-normal);
63
75
  outline: none;
64
- text-align: left;
76
+ text-align: start;
65
77
  -moz-appearance: textfield;
66
78
  }
67
79
 
@@ -108,15 +120,15 @@ void-action-input void-tooltip {
108
120
  }
109
121
 
110
122
  /* Separator lines between btn and input */
111
- /* Default: button on the right */
123
+ /* Default: button at the end */
112
124
  void-action-input .void-action-input-btn {
113
- border-left: var(--void-rule-between);
125
+ border-inline-start: var(--void-rule-between);
114
126
  }
115
127
 
116
- /* Button on the left */
117
- void-action-input[icon-side="left"] .void-action-input-btn {
118
- border-left: none;
119
- border-right: var(--void-rule-between);
128
+ /* Button at the start (icon-side="start" is the start side in the reading direction) */
129
+ void-action-input[icon-side="start"] .void-action-input-btn {
130
+ border-inline-start: none;
131
+ border-inline-end: var(--void-rule-between);
120
132
  }
121
133
 
122
134
  /* Color variants */
@@ -138,12 +150,12 @@ void-action-input:where([color="error"], [color="warning"], [color="caution"], [
138
150
  }
139
151
 
140
152
  void-action-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-action-input-btn {
141
- border-left-color: var(--_void-tone-border);
153
+ border-inline-start-color: var(--_void-tone-border);
142
154
  }
143
155
 
144
- void-action-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"])[icon-side="left"] .void-action-input-btn {
145
- border-left-color: transparent;
146
- border-right-color: var(--_void-tone-border);
156
+ void-action-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"])[icon-side="start"] .void-action-input-btn {
157
+ border-inline-start-color: transparent;
158
+ border-inline-end-color: var(--_void-tone-border);
147
159
  }
148
160
 
149
161
  void-action-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]):focus-within {
@@ -322,7 +322,8 @@ void-date-picker {
322
322
  and its 3:1 edge. It used to be drawn with the divider colour, which is
323
323
  allowed to be faint, at a height and text size of its own. */
324
324
  height: var(--void-control-height);
325
- padding: 0 var(--void-space-8) 0 var(--void-control-padding);
325
+ padding: 0;
326
+ padding-inline: var(--void-control-padding) var(--void-space-8);
326
327
  background: var(--void-field-surface);
327
328
  border: var(--void-control-border-width) solid var(--void-field-border);
328
329
  border-radius: var(--void-control-radius);
@@ -358,7 +359,7 @@ void-date-picker {
358
359
 
359
360
  .void-date-picker-icon {
360
361
  position: absolute;
361
- right: var(--void-space-2);
362
+ inset-inline-end: var(--void-space-2);
362
363
  top: 50%;
363
364
  transform: translateY(-50%);
364
365
  display: inline-flex;
@@ -469,11 +470,13 @@ void-date-picker[disabled] {
469
470
  /* ── Size variants ── */
470
471
 
471
472
  void-date-picker[size="sm"] .void-date-picker-input {
472
- padding: var(--void-space-1) var(--void-space-7) var(--void-space-1) var(--void-space-2);
473
+ padding-block: var(--void-space-1);
474
+ padding-inline: var(--void-space-2) var(--void-space-7);
473
475
  font-size: var(--void-text-xs);
474
476
  }
475
477
 
476
478
  void-date-picker[size="lg"] .void-date-picker-input {
477
- padding: var(--void-space-3) var(--void-space-10) var(--void-space-3) var(--void-space-4);
479
+ padding-block: var(--void-space-3);
480
+ padding-inline: var(--void-space-4) var(--void-space-10);
478
481
  font-size: var(--void-text-base);
479
482
  }
@@ -113,24 +113,24 @@ void-card-footer {
113
113
 
114
114
  /* The first part takes the top corners, the last the bottom ones. */
115
115
  void-card > :first-child {
116
- border-top-left-radius: var(--_void-card-inner-radius);
117
- border-top-right-radius: var(--_void-card-inner-radius);
116
+ border-start-start-radius: var(--_void-card-inner-radius);
117
+ border-start-end-radius: var(--_void-card-inner-radius);
118
118
  }
119
119
 
120
120
  void-card > :last-child {
121
- border-bottom-left-radius: var(--_void-card-inner-radius);
122
- border-bottom-right-radius: var(--_void-card-inner-radius);
121
+ border-end-start-radius: var(--_void-card-inner-radius);
122
+ border-end-end-radius: var(--_void-card-inner-radius);
123
123
  }
124
124
 
125
125
  /* Edge-to-edge media: the first and last child follow the body's corners. */
126
126
  void-card[padding="none"] > void-card-body > :first-child {
127
- border-top-left-radius: inherit;
128
- border-top-right-radius: inherit;
127
+ border-start-start-radius: inherit;
128
+ border-start-end-radius: inherit;
129
129
  }
130
130
 
131
131
  void-card[padding="none"] > void-card-body > :last-child {
132
- border-bottom-left-radius: inherit;
133
- border-bottom-right-radius: inherit;
132
+ border-end-start-radius: inherit;
133
+ border-end-end-radius: inherit;
134
134
  }
135
135
 
136
136
  void-card[padding="none"] > void-card-body {
@@ -23,7 +23,14 @@ void-carousel-item {
23
23
  }
24
24
 
25
25
  void-carousel[orientation="horizontal"] void-carousel-item {
26
- transform: translateX(calc(var(--void-carousel-offset, 0) * -100%));
26
+ transform: translateX(calc(var(--_void-dir, 1) * var(--void-carousel-offset, 0) * -100%));
27
+ }
28
+
29
+ /* The items lay out from the right in RTL, so the slide runs the other way and the arrows mirror. */
30
+ void-carousel:dir(rtl) { --_void-dir: -1; }
31
+
32
+ void-carousel:not([orientation="vertical"]):dir(rtl) :is(void-carousel-previous, void-carousel-next):empty::before {
33
+ scale: -1 1;
27
34
  }
28
35
 
29
36
  void-carousel[orientation="vertical"] {
@@ -29,7 +29,7 @@ void-collapsible-trigger {
29
29
  font-family: var(--void-font-sans);
30
30
  font-size: var(--void-text-base);
31
31
  font-weight: var(--void-weight-medium);
32
- text-align: left;
32
+ text-align: start;
33
33
  cursor: pointer;
34
34
  user-select: none;
35
35
  outline: none;
@@ -34,7 +34,7 @@ void-color-picker {
34
34
  border: 2px solid var(--void-white);
35
35
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(0, 0, 0, 0.3); /* token-ok: thumb contrast ring */
36
36
  pointer-events: none;
37
- left: var(--void-cp-area-x, 0%);
37
+ left: var(--void-cp-area-x, 0%); /* physical: the saturation axis is a colour scale, not text flow */
38
38
  top: var(--void-cp-area-y, 0%);
39
39
  transform: translate(-50%, -50%);
40
40
  }
@@ -63,7 +63,7 @@ void-color-picker {
63
63
  border: 2px solid var(--void-white);
64
64
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); /* token-ok: thumb contrast ring */
65
65
  pointer-events: none;
66
- left: var(--void-cp-hue-x, 0%);
66
+ left: var(--void-cp-hue-x, 0%); /* physical: the hue axis is a colour scale, not text flow */
67
67
  top: 50%;
68
68
  transform: translate(-50%, -50%);
69
69
  background: var(--void-cp-hue);
@@ -235,7 +235,7 @@ void-color-picker {
235
235
  .void-color-picker-compact-dropdown {
236
236
  position: absolute;
237
237
  top: calc(100% + var(--void-space-2));
238
- left: 0;
238
+ inset-inline-start: 0;
239
239
  z-index: var(--void-z-dropdown);
240
240
  background: var(--void-float-surface);
241
241
  border: var(--void-float-border-width) solid var(--void-float-border);
@@ -56,7 +56,8 @@ void-dialog-title {
56
56
  display: block;
57
57
  margin: 0;
58
58
  /* Room for the close button, which is laid over the end of the row. */
59
- padding: var(--_void-dialog-title-inset) calc(var(--void-container-padding) + 1.5rem + var(--void-space-2)) var(--_void-dialog-title-inset) var(--void-container-padding);
59
+ padding-block: var(--_void-dialog-title-inset);
60
+ padding-inline: var(--void-container-padding) calc(var(--void-container-padding) + 1.5rem + var(--void-space-2));
60
61
  border-bottom: var(--void-rule-head);
61
62
  font-family: var(--void-type-heading-family);
62
63
  font-size: var(--void-type-heading-size);
@@ -33,6 +33,7 @@ void-drawer[open]::part(surface) {
33
33
  translate: 0 0;
34
34
  }
35
35
 
36
+ /* "left" and "right" name the screen edge, so these stay physical; "start" and "end" follow the reading direction. */
36
37
  void-drawer[side="left"]::part(surface) {
37
38
  left: 0;
38
39
  top: 0;
@@ -49,9 +50,29 @@ void-drawer[side="right"]::part(surface) {
49
50
  translate: 100% 0;
50
51
  }
51
52
 
53
+ void-drawer[side="start"]::part(surface) {
54
+ inset-inline-start: 0;
55
+ top: 0;
56
+ height: 100%;
57
+ border-inline-end: var(--void-float-border-width) solid var(--void-float-border);
58
+ translate: -100% 0;
59
+ }
60
+
61
+ void-drawer[side="end"]::part(surface) {
62
+ inset-inline-end: 0;
63
+ top: 0;
64
+ height: 100%;
65
+ border-inline-start: var(--void-float-border-width) solid var(--void-float-border);
66
+ translate: 100% 0;
67
+ }
68
+
69
+ /* Sliding out toward the inline edge: the direction of the offset flips in right-to-left. */
70
+ void-drawer[side="start"]:dir(rtl):not([open])::part(surface) { translate: 100% 0; }
71
+ void-drawer[side="end"]:dir(rtl):not([open])::part(surface) { translate: -100% 0; }
72
+
52
73
  void-drawer[side="top"]::part(surface) {
53
74
  top: 0;
54
- left: 0;
75
+ inset-inline-start: 0;
55
76
  width: 100%;
56
77
  border-bottom: var(--void-float-border-width) solid var(--void-float-border);
57
78
  translate: 0 -100%;
@@ -59,7 +80,7 @@ void-drawer[side="top"]::part(surface) {
59
80
 
60
81
  void-drawer[side="bottom"]::part(surface) {
61
82
  bottom: 0;
62
- left: 0;
83
+ inset-inline-start: 0;
63
84
  width: 100%;
64
85
  border-top: var(--void-float-border-width) solid var(--void-float-border);
65
86
  translate: 0 100%;
@@ -72,12 +93,16 @@ void-drawer[open]::part(surface) {
72
93
  @starting-style {
73
94
  void-drawer[side="left"][open]::part(surface) { translate: -100% 0; }
74
95
  void-drawer[side="right"][open]::part(surface) { translate: 100% 0; }
96
+ void-drawer[side="start"][open]::part(surface) { translate: -100% 0; }
97
+ void-drawer[side="end"][open]::part(surface) { translate: 100% 0; }
98
+ void-drawer[side="start"]:dir(rtl)[open]::part(surface) { translate: 100% 0; }
99
+ void-drawer[side="end"]:dir(rtl)[open]::part(surface) { translate: -100% 0; }
75
100
  void-drawer[side="top"][open]::part(surface) { translate: 0 -100%; }
76
101
  void-drawer[side="bottom"][open]::part(surface) { translate: 0 100%; }
77
102
  }
78
103
 
79
- void-drawer[side="left"]::part(surface),
80
- void-drawer[side="right"]::part(surface) {
104
+ void-drawer:is([side="left"], [side="start"])::part(surface),
105
+ void-drawer:is([side="right"], [side="end"])::part(surface) {
81
106
  width: 24rem;
82
107
  }
83
108
 
@@ -86,13 +111,13 @@ void-drawer[side="bottom"]::part(surface) {
86
111
  height: 24rem;
87
112
  }
88
113
 
89
- void-drawer[side="left"][size="sm"]::part(surface),
90
- void-drawer[side="right"][size="sm"]::part(surface) {
114
+ void-drawer:is([side="left"], [side="start"])[size="sm"]::part(surface),
115
+ void-drawer:is([side="right"], [side="end"])[size="sm"]::part(surface) {
91
116
  width: 16rem;
92
117
  }
93
118
 
94
- void-drawer[side="left"][size="lg"]::part(surface),
95
- void-drawer[side="right"][size="lg"]::part(surface) {
119
+ void-drawer:is([side="left"], [side="start"])[size="lg"]::part(surface),
120
+ void-drawer:is([side="right"], [side="end"])[size="lg"]::part(surface) {
96
121
  width: 36rem;
97
122
  }
98
123
 
@@ -111,7 +136,8 @@ void-drawer-title {
111
136
  flex-shrink: 0;
112
137
  margin: 0;
113
138
  /* Room for the close button, which is laid over the end of the row. */
114
- padding: var(--_void-drawer-title-inset) calc(var(--void-container-padding) + 1.5rem + var(--void-space-2)) var(--_void-drawer-title-inset) var(--void-container-padding);
139
+ padding-block: var(--_void-drawer-title-inset);
140
+ padding-inline: var(--void-container-padding) calc(var(--void-container-padding) + 1.5rem + var(--void-space-2));
115
141
  border-bottom: var(--void-rule-head);
116
142
  font-family: var(--void-type-heading-family);
117
143
  font-size: var(--void-type-heading-size);
@@ -26,6 +26,8 @@ void-indicator {
26
26
  padding: 0 4px;
27
27
  }
28
28
 
29
+ /* The placements name corners of the target (top-right is the top right corner
30
+ in either direction), so these stay physical. */
29
31
  void-indicator[placement="top-right"] .void-indicator-dot { top: -4px; right: -4px; }
30
32
  void-indicator[placement="top-left"] .void-indicator-dot { top: -4px; left: -4px; }
31
33
  void-indicator[placement="bottom-right"] .void-indicator-dot { bottom: -4px; right: -4px; }
@@ -73,8 +73,8 @@ void-nav-menu-item[current] > void-nav-menu-trigger > *::after {
73
73
  content: '';
74
74
  position: absolute;
75
75
  bottom: 0;
76
- left: var(--void-space-3);
77
- right: var(--void-space-3);
76
+ inset-inline-start: var(--void-space-3);
77
+ inset-inline-end: var(--void-space-3);
78
78
  height: 2px; /* token-ok: decorative active indicator */
79
79
  background: var(--void-color-accent);
80
80
  border-radius: var(--void-radius-full);
@@ -83,8 +83,8 @@ void-nav-menu-item[current] > void-nav-menu-trigger > *::after {
83
83
  void-nav-menu[orientation="vertical"] void-nav-menu-item[current] > void-nav-menu-trigger > *::after {
84
84
  top: var(--void-space-2);
85
85
  bottom: var(--void-space-2);
86
- left: 0;
87
- right: auto;
86
+ inset-inline-start: 0;
87
+ inset-inline-end: auto;
88
88
  width: 2px; /* token-ok: decorative active indicator */
89
89
  height: auto;
90
90
  }
@@ -98,7 +98,7 @@ void-nav-menu-item[disabled] > void-nav-menu-trigger > * {
98
98
  void-nav-menu-content {
99
99
  position: absolute;
100
100
  top: 100%;
101
- left: 0;
101
+ inset-inline-start: 0;
102
102
  z-index: var(--void-z-dropdown);
103
103
  min-width: 12rem; /* token-ok: intrinsic dropdown minimum width */
104
104
  padding: var(--void-space-2);
@@ -126,10 +126,13 @@ void-nav-menu-item[open] > void-nav-menu-content {
126
126
  transform: translateY(0);
127
127
  }
128
128
 
129
+ /* A sub-menu opens towards the end edge, so its slide-in runs the other way in RTL. */
130
+ void-nav-menu:dir(rtl) { --_void-dir: -1; }
131
+
129
132
  void-nav-menu[orientation="vertical"] void-nav-menu-content {
130
133
  top: 0;
131
- left: 100%;
132
- transform: translateX(var(--void-space-1));
134
+ inset-inline-start: 100%;
135
+ transform: translateX(calc(var(--_void-dir, 1) * var(--void-space-1)));
133
136
  }
134
137
 
135
138
  void-nav-menu[orientation="vertical"] void-nav-menu-item[open] > void-nav-menu-content {
@@ -69,21 +69,21 @@ void-number-input input.void-number-input-field::placeholder {
69
69
  }
70
70
 
71
71
  .void-number-input-prefix {
72
- padding-left: var(--_void-field-padding);
72
+ padding-inline-start: var(--_void-field-padding);
73
73
  }
74
74
 
75
75
  .void-number-input-unit {
76
- padding-right: var(--_void-field-padding);
76
+ padding-inline-end: var(--_void-field-padding);
77
77
  }
78
78
 
79
- /* When a prefix is present, the input doesn't need its own left padding */
79
+ /* When a prefix is present, the input doesn't need its own start padding */
80
80
  void-number-input:has(.void-number-input-prefix) input.void-number-input-field {
81
- padding-left: var(--void-space-1);
81
+ padding-inline-start: var(--void-space-1);
82
82
  }
83
83
 
84
- /* When a unit is present, the input doesn't need its own right padding */
84
+ /* When a unit is present, the input doesn't need its own end padding */
85
85
  void-number-input:has(.void-number-input-unit) input.void-number-input-field {
86
- padding-right: var(--void-space-1);
86
+ padding-inline-end: var(--void-space-1);
87
87
  }
88
88
 
89
89
  /* Stepper buttons */
@@ -121,18 +121,18 @@ void-number-input:has(.void-number-input-unit) input.void-number-input-field {
121
121
  /* Separator lines between btn and input: the rule between items of one
122
122
  group, so a skin that draws its rules in ink draws these too. */
123
123
  .void-number-input-btn-dec {
124
- border-right: var(--void-rule-between);
124
+ border-inline-end: var(--void-rule-between);
125
125
  }
126
126
 
127
127
  .void-number-input-btn-inc {
128
- border-left: var(--void-rule-between);
128
+ border-inline-start: var(--void-rule-between);
129
129
  }
130
130
 
131
131
  /* controls="right" — both buttons stacked vertically on the right */
132
132
  void-number-input[controls="right"] .void-number-input-btn-group {
133
133
  display: flex;
134
134
  flex-direction: column;
135
- border-left: var(--void-rule-between);
135
+ border-inline-start: var(--void-rule-between);
136
136
  }
137
137
 
138
138
  void-number-input[controls="right"] .void-number-input-btn {
@@ -147,7 +147,7 @@ void-number-input[controls="right"] .void-number-input-btn-inc {
147
147
 
148
148
  /* controls="none" — just the input, no separators */
149
149
  void-number-input[controls="none"] input.void-number-input-field {
150
- text-align: left;
150
+ text-align: start;
151
151
  }
152
152
 
153
153
  /* Color variants */
@@ -169,15 +169,15 @@ void-number-input:where([color="error"], [color="warning"], [color="caution"], [
169
169
  }
170
170
 
171
171
  void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-dec {
172
- border-right-color: var(--_void-tone-border);
172
+ border-inline-end-color: var(--_void-tone-border);
173
173
  }
174
174
 
175
175
  void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-inc {
176
- border-left-color: var(--_void-tone-border);
176
+ border-inline-start-color: var(--_void-tone-border);
177
177
  }
178
178
 
179
179
  void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-group {
180
- border-left-color: var(--_void-tone-border);
180
+ border-inline-start-color: var(--_void-tone-border);
181
181
  }
182
182
 
183
183
  void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-inc {
@@ -84,7 +84,7 @@ void-multiselect-content,
84
84
  position: fixed;
85
85
  inset: auto;
86
86
  margin: 0;
87
- left: var(--void-overlay-x);
87
+ left: var(--void-overlay-x); /* physical: viewport coordinates from the positioning script */
88
88
  top: var(--void-overlay-y);
89
89
  }
90
90
 
@@ -37,9 +37,11 @@ void-progress[indeterminate] .void-progress-fill {
37
37
  animation: void-progress-indeterminate 1.5s ease-in-out infinite;
38
38
  }
39
39
 
40
+ void-progress:dir(rtl) { --_void-dir: -1; }
41
+
40
42
  @keyframes void-progress-indeterminate {
41
- 0% { transform: translateX(-100%); }
42
- 100% { transform: translateX(350%); }
43
+ 0% { transform: translateX(calc(var(--_void-dir, 1) * -100%)); }
44
+ 100% { transform: translateX(calc(var(--_void-dir, 1) * 350%)); }
43
45
  }
44
46
 
45
47
  /* Reduced motion: indeterminate state becomes a static, dimmed full bar
@@ -12,7 +12,7 @@ void-select {
12
12
  void-select::after {
13
13
  content: '';
14
14
  position: absolute;
15
- right: var(--_void-field-padding);
15
+ inset-inline-end: var(--_void-field-padding);
16
16
  /* Centred on the control, which is the first row of the host. */
17
17
  top: calc((var(--_void-field-height) - 0.75rem) / 2);
18
18
  width: 0.75rem;
@@ -30,7 +30,7 @@ void-select select {
30
30
  width: 100%;
31
31
  height: var(--_void-field-height);
32
32
  padding: 0 var(--_void-field-padding);
33
- padding-right: calc(var(--_void-field-padding) * 2 + 0.75rem);
33
+ padding-inline-end: calc(var(--_void-field-padding) * 2 + 0.75rem);
34
34
  background: var(--void-field-surface);
35
35
  border: var(--void-control-border-width) solid var(--void-field-border);
36
36
  border-radius: var(--void-control-radius);
@@ -8,7 +8,7 @@ void-sidebar {
8
8
  width: var(--void-sidebar-width);
9
9
  height: 100%;
10
10
  background: var(--void-sidebar-surface, var(--void-color-bg));
11
- border-right: var(--void-sidebar-rule, var(--void-rule));
11
+ border-inline-end: var(--void-sidebar-rule, var(--void-rule));
12
12
  overflow: hidden;
13
13
  font-family: var(--void-font-sans);
14
14
  color: var(--void-color-text);
@@ -16,9 +16,11 @@ void-sidebar {
16
16
  flex-shrink: 0;
17
17
  }
18
18
 
19
- void-sidebar[side="right"] {
20
- border-right: none;
21
- border-left: var(--void-sidebar-rule, var(--void-rule));
19
+ /* "start" and "end" name which side of the content the sidebar sits on in
20
+ the reading direction: the rule follows the inner edge, so it flips with dir. */
21
+ void-sidebar[side="end"] {
22
+ border-inline-end: none;
23
+ border-inline-start: var(--void-sidebar-rule, var(--void-rule));
22
24
  }
23
25
 
24
26
  void-sidebar[collapsed] {
@@ -21,6 +21,15 @@ void-slider input[type="range"] {
21
21
  transition: opacity var(--void-duration-fast) var(--void-ease-in-out);
22
22
  }
23
23
 
24
+ /* A range input runs from the end edge in RTL, so its fill does too. */
25
+ void-slider input[type="range"]:dir(rtl) {
26
+ background: linear-gradient(
27
+ to left,
28
+ var(--void-color-accent) var(--void-slider-fill, 50%),
29
+ var(--void-color-border) var(--void-slider-fill, 50%)
30
+ );
31
+ }
32
+
24
33
  void-slider input[type="range"]::-webkit-slider-thumb {
25
34
  -webkit-appearance: none;
26
35
  appearance: none;
@@ -78,7 +87,7 @@ void-slider input[type="range"]:focus-visible::-moz-range-thumb {
78
87
  font-size: var(--void-text-xs);
79
88
  color: var(--void-color-text-secondary);
80
89
  min-width: 2rem;
81
- text-align: right;
90
+ text-align: end;
82
91
  }
83
92
 
84
93
  void-slider[size="sm"] input[type="range"] {
@@ -48,7 +48,7 @@ void-stepper {
48
48
  .void-stepper-label {
49
49
  position: absolute;
50
50
  bottom: 0;
51
- left: 50%;
51
+ left: 50%; /* centred on the circle: symmetric, so it needs no mirroring */
52
52
  transform: translateX(-50%);
53
53
  font-size: var(--void-text-xs);
54
54
  color: var(--void-color-text-muted);
@@ -23,7 +23,7 @@ void-switch {
23
23
 
24
24
  .void-switch-thumb {
25
25
  position: absolute;
26
- left: 2px;
26
+ inset-inline-start: 2px;
27
27
  width: 0.875rem;
28
28
  height: 0.875rem;
29
29
  background: var(--void-color-text-secondary);
@@ -38,7 +38,7 @@ void-switch[checked] .void-switch-track {
38
38
  }
39
39
 
40
40
  void-switch[checked] .void-switch-thumb {
41
- transform: translateX(1rem);
41
+ transform: translateX(calc(var(--_void-dir, 1) * 1rem));
42
42
  background: var(--void-color-text-on-accent);
43
43
  }
44
44
 
@@ -61,11 +61,14 @@ void-switch[color="notice"] { --_void-tone: var(--void-color-notice); }
61
61
 
62
62
  void-switch[size="sm"] .void-switch-track { width: 1.75rem; height: 1rem; }
63
63
  void-switch[size="sm"] .void-switch-thumb { width: 0.625rem; height: 0.625rem; }
64
- void-switch[size="sm"][checked] .void-switch-thumb { transform: translateX(0.75rem); }
64
+ void-switch[size="sm"][checked] .void-switch-thumb { transform: translateX(calc(var(--_void-dir, 1) * 0.75rem)); }
65
65
 
66
66
  void-switch[size="lg"] .void-switch-track { width: 2.75rem; height: 1.5rem; }
67
67
  void-switch[size="lg"] .void-switch-thumb { width: 1.125rem; height: 1.125rem; }
68
- void-switch[size="lg"][checked] .void-switch-thumb { transform: translateX(1.25rem); } /* token-ok: track size, not a control height */
68
+ void-switch[size="lg"][checked] .void-switch-thumb { transform: translateX(calc(var(--_void-dir, 1) * 1.25rem)); } /* token-ok: track size, not a control height */
69
+
70
+ /* The thumb slides towards the end edge, so the shift flips in RTL. */
71
+ void-switch:dir(rtl) { --_void-dir: -1; }
69
72
 
70
73
  void-switch[disabled] {
71
74
  opacity: 0.5;
@@ -63,7 +63,7 @@ void-table caption {
63
63
  /* Header cells are labels: the small quiet name of a column. */
64
64
  void-table th {
65
65
  vertical-align: middle;
66
- text-align: left;
66
+ text-align: start;
67
67
  font-family: var(--void-type-label-family);
68
68
  font-size: var(--void-type-label-size);
69
69
  line-height: var(--void-type-label-leading);
@@ -45,6 +45,12 @@ void-tabs-list {
45
45
  mask-image: linear-gradient(to right, transparent, black var(--_void-tabs-fade-start), black calc(100% - var(--_void-tabs-fade-end)), transparent);
46
46
  }
47
47
 
48
+ /* The fade follows the scroll direction, which runs from the right in RTL. */
49
+ void-tabs-list:dir(rtl) {
50
+ -webkit-mask-image: linear-gradient(to left, transparent, black var(--_void-tabs-fade-start), black calc(100% - var(--_void-tabs-fade-end)), transparent);
51
+ mask-image: linear-gradient(to left, transparent, black var(--_void-tabs-fade-start), black calc(100% - var(--_void-tabs-fade-end)), transparent);
52
+ }
53
+
48
54
  void-tabs-list::-webkit-scrollbar {
49
55
  display: none;
50
56
  }