@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40

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 (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. package/src/wizard/wizard.css +187 -199
@@ -13,7 +13,7 @@
13
13
  * implied by `tr`, `th` and `td`, and writing them again would be the
14
14
  * duplication `patterns.md` refuses.
15
15
  */
16
- [data-ui='calendar'][data-part='root'] {
16
+ [data-ui-calendar][data-part-root] {
17
17
  /**
18
18
  * The reflow container. It is on the root and the grids are one element
19
19
  * in, because `container-type: inline-size` makes an element a query
@@ -25,20 +25,33 @@
25
25
  container-name: slotted-calendar;
26
26
 
27
27
  --_font-size: var(--slotted-control-font-size-md, 13px);
28
- --_gap: var(--slotted-control-gap-md, 8px);
28
+ --_gap: 0px;
29
29
  --_icon-size: var(--slotted-control-icon-size-md, 16px);
30
30
  /**
31
- * A cell is square, and its side is the control height rather than a scale
32
- * of its own: a calendar cell is a control the reader presses, and one
33
- * drawn to a different rhythm from the buttons above it reads as a second
34
- * component. `dense` takes it to 26 pixels, above the WCAG minimum, and
35
- * the coarse-pointer block the theme emits takes it to 44 on touch.
31
+ * A cell is two pixels wider than the control and two pixels lower: seven
32
+ * of them are whole pixels, and six weeks stand beside a clock without
33
+ * scrolling. `dense` keeps both above the WCAG minimum, and the
34
+ * coarse-pointer block the theme emits takes them to 46 and 42 on touch.
36
35
  */
37
- --_cell-size: var(--slotted-calendar-cell-size, var(--slotted-control-height-md, 34px));
38
- /** Seven days, four months, four years: the shape of the three views. */
36
+ --_cell-size: var(
37
+ --slotted-calendar-cell-size,
38
+ calc(var(--slotted-control-height-md, 34px) + 2px)
39
+ );
40
+ /* Two pixels under the control: six weeks stand beside a clock. */
41
+ --_cell-block-size: var(
42
+ --slotted-calendar-cell-block-size,
43
+ max(var(--slotted-target-min, 24px), calc(var(--slotted-control-height-md, 34px) - 2px))
44
+ );
45
+ /* The page triggers, a step under the control, so the header is one row of text. */
46
+ --_trigger-size: max(
47
+ var(--slotted-target-min, 24px),
48
+ calc(var(--slotted-control-height-md, 34px) - 6px)
49
+ );
50
+ --_day-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-md, 6px));
51
+ /** Seven days, three months, three years: the shape of the three views. */
39
52
  --_columns: 7;
40
53
  --_months: 1;
41
- --_month-gap: var(--slotted-space-6, 1rem);
54
+ --_month-gap: var(--slotted-calendar-month-gap, calc(var(--slotted-space-6, 1rem) * 2));
42
55
  /** The week number is a column of its own when a product asks for one. */
43
56
  --_week-number-columns: 0;
44
57
  --_grid-size: calc(var(--_cell-size) * (var(--_columns) + var(--_week-number-columns)));
@@ -73,17 +86,17 @@
73
86
  * month nobody can read above a grid whose only subject is that month.
74
87
  * `contain: inline-size` means the contents cannot ask for the room
75
88
  * themselves, so the floor is stated: twenty characters of the heading's
76
- * own type, the three glyph boxes of the two triggers and the view mark,
77
- * and the gaps between them. It is written in `ch` and in the icon scale
89
+ * own type, the two glyph boxes of the triggers and the gaps beside
90
+ * them. It is written in `ch` and in the icon scale
78
91
  * rather than in pixels, so it moves with the type and with density instead
79
92
  * of being a guess that is right at one step.
80
93
  *
81
94
  * At `comfortable` the grid is wider than the floor and nothing changes. A
82
95
  * locale with a longer month name still loses its tail, from a floor high
83
- * enough to keep the name readable, and `grids` centres the month under the
96
+ * enough to keep the name readable, and `grids` centers the month under the
84
97
  * row it belongs to.
85
98
  */
86
- --_heading-floor: calc(20ch + 3 * var(--_icon-size) + 4 * var(--_gap));
99
+ --_heading-floor: calc(20ch + 2 * var(--_icon-size) + 2 * var(--slotted-control-gap-md, 8px));
87
100
 
88
101
  inline-size: max(
89
102
  calc(var(--_grid-size) * var(--_months) + var(--_month-gap) * (var(--_months) - 1)),
@@ -92,15 +105,15 @@
92
105
  max-inline-size: 100%;
93
106
  }
94
107
 
95
- [data-ui='calendar'][data-part='root'][data-week-numbers] {
108
+ [data-ui-calendar][data-part-root][data-week-numbers] {
96
109
  --_week-number-columns: 0.75;
97
110
  }
98
111
 
99
- [data-ui='calendar'][data-part='root'][data-months='2'] {
112
+ [data-ui-calendar][data-part-root][data-months='2'] {
100
113
  --_months: 2;
101
114
  }
102
115
 
103
- [data-ui='calendar'][data-part='root'][data-months='3'] {
116
+ [data-ui-calendar][data-part-root][data-months='3'] {
104
117
  --_months: 3;
105
118
  }
106
119
 
@@ -124,31 +137,35 @@
124
137
  * condition, which is what makes `clamp()` the answer here rather than a
125
138
  * query.
126
139
  */
127
- [data-ui='calendar'] [data-part='header'],
128
- [data-ui='calendar'] [data-part='grids'],
129
- [data-ui='calendar'] [data-part='months'],
130
- [data-ui='calendar'] [data-part='years'] {
140
+ [data-ui-calendar] [data-part-header],
141
+ [data-ui-calendar] [data-part-grids],
142
+ [data-ui-calendar] [data-part-months],
143
+ [data-ui-calendar] [data-part-years] {
131
144
  --_cell-size: clamp(
132
145
  var(--slotted-target-min, 24px),
133
146
  calc(100cqi / (var(--_columns) + var(--_week-number-columns)) / var(--_months)),
134
- var(--slotted-calendar-cell-size, var(--slotted-control-height-md, 34px))
147
+ var(--slotted-calendar-cell-size, calc(var(--slotted-control-height-md, 34px) + 2px))
135
148
  );
136
149
  }
137
150
 
138
151
  /* ── The heading row ──────────────────────────────────────────────────
139
152
  *
140
- * The month, and the two triggers that page it. The heading sits between
141
- * them rather than beside them, because it is the thing being changed and a
142
- * label at one end would make the pair read as two unrelated buttons.
153
+ * The name of a month between the two triggers that page it. Two months
154
+ * share the pair: previous stands on the first and next on the last, and the
155
+ * three columns keep each name over the middle of its own grid.
143
156
  */
144
- [data-ui='calendar'] [data-part='header'] {
157
+ [data-ui-calendar] [data-part-header] {
145
158
  align-items: center;
146
- display: flex;
147
- gap: var(--slotted-space-2, 0.25rem);
159
+ display: grid;
160
+ grid-template-columns: var(--_trigger-size) minmax(0, 1fr) var(--_trigger-size);
148
161
  /* The row is as wide as the grid under it, so the two triggers sit over
149
162
  the first and last columns rather than floating above the middle. */
150
163
  inline-size: 100%;
151
- justify-content: space-between;
164
+ min-block-size: var(--_trigger-size);
165
+ }
166
+
167
+ [data-ui-calendar] [data-part-next] {
168
+ grid-column: 3;
152
169
  }
153
170
 
154
171
  /**
@@ -157,7 +174,7 @@
157
174
  * that is what it says. The live region is on it: paging with a key changes
158
175
  * nothing that focus lands on, so without this nothing announces the month.
159
176
  */
160
- [data-ui='calendar'] [data-part='heading'] {
177
+ [data-ui-calendar] [data-part-heading] {
161
178
  --slotted-icon-size: var(--_icon-size);
162
179
 
163
180
  appearance: none;
@@ -166,59 +183,30 @@
166
183
  border-radius: var(--slotted-calendar-radius, var(--slotted-control-radius, 4px));
167
184
  color: inherit;
168
185
  cursor: pointer;
169
- display: inline-flex;
170
- align-items: center;
171
- gap: var(--slotted-space-2, 0.25rem);
186
+ display: block;
172
187
  font: inherit;
188
+ font-size: var(--slotted-font-size-md, 0.875rem);
173
189
  font-weight: var(--slotted-font-weight-semibold, 600);
174
- /**
175
- * It takes the room between the two triggers, and gives it back only when
176
- * there is not enough — `setembro de 2026` and two triggers are 239 pixels
177
- * against a seven-column grid of 238, so without this the trigger at the
178
- * end fell to a second line.
179
- *
180
- * The first capture of this family showed the opposite failure, and it is
181
- * worth naming because the two look like the same rule: the heading read
182
- * `d`, one character, with the grid overflowing under it. That was the
183
- * root's `inline-size: fit-content` under `contain: inline-size`, not this
184
- * — a contained root has no contents to be sized by, so it collapsed and
185
- * took the heading with it. With the root's width stated, shrinking here
186
- * is bounded by the grid and stops long before a character.
187
- */
188
- flex: 1 1 auto;
189
- /**
190
- * `safe`, and it is the whole difference between a month that is cut and a
191
- * month that is unreadable.
192
- *
193
- * Centred without it, an overflowing heading is clipped at **both** ends:
194
- * at `dense` the row read `etembro de 2026` with the view mark sliced off,
195
- * which is a month nobody can read above a grid whose only subject is that
196
- * month. `safe` falls back to start alignment exactly when the item would
197
- * overflow, so the name always begins where it begins and only its tail is
198
- * lost. Found from `datetime-picker`'s panel, reproduced on this family
199
- * alone at `dense` and 720 pixels.
200
- *
201
- * `text-overflow: ellipsis` stood here and did nothing: it applies to the
202
- * inline content of a block container, and the label is an anonymous flex
203
- * item beside the mark. It is removed rather than left to look like a
204
- * guard that is holding.
205
- */
206
- justify-content: safe center;
190
+ grid-column: 2;
191
+ justify-self: center;
192
+ max-inline-size: 100%;
207
193
  min-inline-size: 0;
208
- padding-block: var(--slotted-space-2, 0.25rem);
209
- padding-inline: var(--slotted-space-2, 0.25rem);
194
+ padding: var(--slotted-space-1, 0.125rem) var(--slotted-space-3, 0.375rem);
210
195
  /* One line, whatever the locale writes: a month name that wrapped would
211
- take the grid down with it. */
196
+ take the grid down with it, and one that does not fit loses its tail. */
212
197
  overflow: hidden;
198
+ text-overflow: ellipsis;
213
199
  white-space: nowrap;
214
200
  transition: background-color var(--slotted-control-transition-duration)
215
201
  var(--slotted-control-transition-easing);
216
202
  -webkit-tap-highlight-color: transparent;
217
203
  }
218
204
 
219
- /* The chevron after the name is a `Glyph` the binding draws. The way up is
220
- closed at the top: a year view has nowhere further to go, so the binding
221
- leaves the mark that offered it out rather than showing it disabled. */
205
+ /* What the locale writes around the name, lighter than the name. */
206
+ [data-ui-calendar] [data-part-heading-rest] {
207
+ color: var(--slotted-calendar-heading-rest-color, var(--slotted-text-muted, GrayText));
208
+ font-weight: var(--slotted-font-weight-regular, 400);
209
+ }
222
210
 
223
211
  /* ── The two page triggers ────────────────────────────────────────────
224
212
  *
@@ -226,21 +214,20 @@
226
214
  * under `dir="rtl"` by the icon's own rule, which is how one glyph serves
227
215
  * both document directions.
228
216
  */
229
- [data-ui='calendar'] [data-part='previous'],
230
- [data-ui='calendar'] [data-part='next'] {
217
+ [data-ui-calendar] [data-part-previous],
218
+ [data-ui-calendar] [data-part-next] {
231
219
  --slotted-icon-size: var(--_icon-size);
232
220
 
233
221
  align-items: center;
234
222
  appearance: none;
235
223
  background-color: transparent;
236
- block-size: var(--_cell-size);
224
+ block-size: var(--_trigger-size);
237
225
  border: 0;
238
226
  border-radius: var(--slotted-calendar-radius, var(--slotted-control-radius, 4px));
239
227
  color: var(--slotted-calendar-trigger-color, var(--slotted-text-muted, GrayText));
240
228
  cursor: pointer;
241
229
  display: inline-flex;
242
- flex: 0 0 auto;
243
- inline-size: var(--_cell-size);
230
+ inline-size: var(--_trigger-size);
244
231
  justify-content: center;
245
232
  padding: 0;
246
233
  touch-action: manipulation;
@@ -257,7 +244,7 @@
257
244
  * RTL mirror composes with the turn, so both follow `dir` without a second
258
245
  * glyph — the rule `pagination` set.
259
246
  */
260
- [data-ui='calendar'] [data-part='previous'] > [data-ui='icon'] {
247
+ [data-ui-calendar] [data-part-previous] > [data-ui-icon] {
261
248
  rotate: 180deg;
262
249
  }
263
250
 
@@ -267,7 +254,7 @@
267
254
  * narrower than its months is a calendar with fewer months, and a sideways
268
255
  * scrollbar under a grid is a control nobody finds.
269
256
  */
270
- [data-ui='calendar'] [data-part='grids'] {
257
+ [data-ui-calendar] [data-part-grids] {
271
258
  display: flex;
272
259
  /**
273
260
  * A second month that does not fit goes under the first rather than being
@@ -283,7 +270,7 @@
283
270
  justify-content: center;
284
271
  }
285
272
 
286
- [data-ui='calendar'] [data-part='grid'] {
273
+ [data-ui-calendar] [data-part-grid] {
287
274
  border-collapse: collapse;
288
275
  /* A table sizes itself from its content and would give a 31-day column one
289
276
  pixel more than a 30-day one. Fixed layout hands every column the same
@@ -292,11 +279,10 @@
292
279
  }
293
280
 
294
281
  /**
295
- * The month's own name. With one month it is out of the picture and not out
296
- * of the document — the heading above already shows it, and a screen reader
297
- * reaching the grid still needs it.
282
+ * The month's own name, out of the picture and not out of the document: the
283
+ * heading above shows it, and it names the grid where there is no heading.
298
284
  */
299
- [data-ui='calendar'] [data-part='grid-caption'] {
285
+ [data-ui-calendar] [data-part-grid-caption] {
300
286
  block-size: 1px;
301
287
  clip-path: inset(50%);
302
288
  inline-size: 1px;
@@ -305,32 +291,13 @@
305
291
  white-space: nowrap;
306
292
  }
307
293
 
308
- /**
309
- * With more than one month it is shown, because the heading then names the
310
- * span rather than a month and nothing else would say which grid is which.
311
- * A reader looking at two grids and one title has to count columns to find
312
- * out where October starts.
313
- */
314
- [data-ui='calendar'][data-part='root']:is([data-months='2'], [data-months='3'])
315
- [data-part='grid-caption'] {
316
- block-size: auto;
317
- clip-path: none;
318
- color: var(--slotted-calendar-weekday-color, var(--slotted-text-muted, GrayText));
319
- font-size: var(--slotted-font-size-xs, 0.75rem);
320
- font-weight: var(--slotted-font-weight-semibold, 600);
321
- inline-size: auto;
322
- overflow: visible;
323
- padding-block-end: var(--slotted-space-2, 0.25rem);
324
- position: static;
325
- }
326
-
327
294
  /**
328
295
  * The weekday. Two characters is what a column can hold; the full name
329
296
  * reaches assistive technology through `abbr`, which is the APG's own
330
297
  * answer and the difference between hearing "Mo" and hearing "Monday".
331
298
  */
332
- [data-ui='calendar'] [data-part='week-header'] {
333
- block-size: var(--_cell-size);
299
+ [data-ui-calendar] [data-part-week-header] {
300
+ block-size: var(--slotted-target-min, 24px);
334
301
  color: var(--slotted-calendar-weekday-color, var(--slotted-text-muted, GrayText));
335
302
  font-size: var(--slotted-font-size-xs, 0.75rem);
336
303
  font-weight: var(--slotted-font-weight-medium, 500);
@@ -341,7 +308,7 @@
341
308
  text-overflow: clip;
342
309
  }
343
310
 
344
- [data-ui='calendar'] [data-part='week-number'] {
311
+ [data-ui-calendar] [data-part-week-number] {
345
312
  color: var(--slotted-calendar-week-number-color, var(--slotted-text-muted, GrayText));
346
313
  font-size: var(--slotted-font-size-xs, 0.75rem);
347
314
  font-variant-numeric: tabular-nums;
@@ -350,12 +317,29 @@
350
317
  and a column as wide as a day would read as an eighth day. */
351
318
  inline-size: calc(var(--_cell-size) * 0.75);
352
319
  padding: 0;
353
- /* The line that says the numbers are not part of the week. */
354
- border-inline-end: var(--slotted-border-width-thin, 1px) solid
355
- var(--slotted-calendar-week-number-border-color, var(--slotted-border-subtle, ButtonBorder));
356
320
  }
357
321
 
358
- [data-ui='calendar'] [data-part='cell'] {
322
+ /* The number as a press, where a week may be chosen whole. */
323
+ [data-ui-calendar] [data-part-week-choice] {
324
+ appearance: none;
325
+ background-color: transparent;
326
+ block-size: 100%;
327
+ border: 0;
328
+ border-radius: var(--_day-radius);
329
+ color: inherit;
330
+ cursor: pointer;
331
+ font: inherit;
332
+ font-variant-numeric: inherit;
333
+ inline-size: 100%;
334
+ min-block-size: var(--slotted-target-min, 24px);
335
+ padding: 0;
336
+ transition:
337
+ background-color var(--slotted-control-transition-duration)
338
+ var(--slotted-control-transition-easing),
339
+ color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
340
+ }
341
+
342
+ [data-ui-calendar] [data-part-cell] {
359
343
  padding: 0;
360
344
  /* The containing block of the range band below. */
361
345
  position: relative;
@@ -365,44 +349,28 @@
365
349
  * The day the reader presses.
366
350
  *
367
351
  * It is the `td`'s child rather than the `td` itself, because the range band
368
- * has to run edge to edge across a cell while the day itself stays a circle
369
- * inside it — two shapes, and one element cannot be both.
352
+ * has to run edge to edge across a cell while the day itself stays a rounded
353
+ * box inside it — two shapes, and one element cannot be both.
370
354
  */
371
- [data-ui='calendar'] [data-part='day'] {
355
+ [data-ui-calendar] [data-part-day] {
372
356
  /**
373
- * A rule short of the cell on every side, in every cell.
374
- *
375
- * Two chosen days side by side are two solid boxes, and filling the cell
376
- * put their rounded corners against each other with no air between —
377
- * which reads as one shape with a dent rather than as two days. The inset
378
- * is taken everywhere rather than only where it shows, so no day is a
379
- * different size from the day beside it.
357
+ * A rule short of the cell above and below, so a week stands apart from
358
+ * the next one and a band keeps the same air as the days on it.
380
359
  */
381
360
  --_inset: var(--slotted-border-width-thin, 1px);
382
361
 
383
362
  align-items: center;
384
- block-size: calc(var(--_cell-size) - var(--_inset) * 2);
385
- inline-size: calc(var(--_cell-size) - var(--_inset) * 2);
386
- margin: var(--_inset);
387
- border-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));
363
+ block-size: calc(var(--_cell-block-size) - var(--_inset) * 2);
364
+ inline-size: var(--_cell-size);
365
+ margin-block: var(--_inset);
366
+ border-radius: var(--_day-radius);
388
367
  box-sizing: border-box;
389
368
  color: inherit;
390
369
  cursor: pointer;
391
370
  display: flex;
392
371
  font-variant-numeric: tabular-nums;
393
- /**
394
- * A column, and the second row is today's dot — reserved in every cell,
395
- * painted in one. Left to today alone the mark either overlapped the digit
396
- * or moved it, and a month whose ninth sits two pixels higher than its
397
- * tenth is a month with a dent in it.
398
- */
399
372
  flex-direction: column;
400
- /* The digit and the dot are not the same thing, and a mark against the
401
- descender of a nine reads as part of it. */
402
- gap: var(--slotted-space-1, 0.125rem);
403
373
  justify-content: center;
404
- /* The digit's own box, and nothing more: the leading a paragraph needs is
405
- air the cell has to give to the dot instead. */
406
374
  line-height: 1;
407
375
  /* Above the range band, which is painted on the cell behind it. */
408
376
  position: relative;
@@ -420,7 +388,7 @@
420
388
  * whose control scale is smaller gets the target back without the family
421
389
  * having to know which theme it is under.
422
390
  */
423
- [data-ui='calendar'] [data-part='day']::after {
391
+ [data-ui-calendar] [data-part-day]::after {
424
392
  content: '';
425
393
  inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
426
394
  position: absolute;
@@ -428,33 +396,39 @@
428
396
 
429
397
  /* ── The month and year views ─────────────────────────────────────────
430
398
  *
431
- * Four columns rather than seven, and a cell wide enough for a month's short
399
+ * Three columns rather than seven, and a cell wide enough for a month's whole
432
400
  * name. A reader entering a birth date must not press "previous month" four
433
401
  * hundred times, which is what these two exist to prevent.
434
402
  */
435
- [data-ui='calendar'] [data-part='months'],
436
- [data-ui='calendar'] [data-part='years'] {
403
+ [data-ui-calendar] [data-part-months],
404
+ [data-ui-calendar] [data-part-years] {
437
405
  display: grid;
438
406
  gap: var(--slotted-space-2, 0.25rem);
439
- grid-template-columns: repeat(4, 1fr);
407
+ grid-template-columns: repeat(3, minmax(0, 1fr));
408
+ padding-block-start: var(--slotted-space-2, 0.25rem);
440
409
  /* The same box the day grid occupies, so switching view does not resize
441
410
  the surface the reader is looking at. */
442
411
  inline-size: calc(var(--_cell-size) * var(--_columns));
412
+ max-inline-size: 100%;
443
413
  }
444
414
 
445
- [data-ui='calendar'] [data-part='period'] {
415
+ [data-ui-calendar] [data-part-period] {
446
416
  align-items: center;
447
417
  appearance: none;
448
- background-color: transparent;
449
- block-size: var(--_cell-size);
418
+ background-color: var(
419
+ --slotted-calendar-period-background,
420
+ var(--slotted-surface-sunken, ButtonFace)
421
+ );
422
+ block-size: var(--slotted-calendar-period-block-size, var(--slotted-target-comfortable, 44px));
450
423
  border: 0;
451
- border-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));
424
+ border-radius: var(--_day-radius);
452
425
  color: inherit;
453
426
  cursor: pointer;
454
427
  display: flex;
455
428
  font: inherit;
456
429
  justify-content: center;
457
- padding-inline: var(--slotted-space-2, 0.25rem);
430
+ min-inline-size: 0;
431
+ padding-inline: var(--slotted-space-1, 0.125rem);
458
432
  transition:
459
433
  background-color var(--slotted-control-transition-duration)
460
434
  var(--slotted-control-transition-easing),
@@ -465,29 +439,42 @@
465
439
  /* ── What a cell can say ──────────────────────────────────────────────
466
440
  *
467
441
  * Seven facts, and every one of them paired with a shape rather than carried
468
- * by colour alone. Under `forced-colors` a palette becomes four system
469
- * colours, and every surveyed calendar loses six of these seven there.
442
+ * by color alone. Under `forced-colors` a palette becomes four system
443
+ * colors, and every surveyed calendar loses six of these seven there.
470
444
  */
471
445
 
472
446
  /**
473
447
  * Today. Marked apart from the selection, as §6 of the feature guide asks in
474
448
  * those words: a reader who has chosen today must still see both facts.
475
449
  *
476
- * A dot rather than a ring, and the reason is in the first focus capture of
477
- * this family: today was drawn as a ring and focus is drawn as a ring, so a
478
- * reader arrowing onto today saw one box and could not tell which of the two
479
- * it was. Two facts need two shapes. The dot is `currentcolor`, so it takes
480
- * the ink of whatever state the day is in — the accent text at rest, the
481
- * fill's own ink when the day is chosen, the disabled grey when nothing is
482
- * operable — and it survives `forced-colors`, where `currentcolor` is
483
- * already the system's ink.
484
- */
485
- [data-ui='calendar'] [data-part='day'][data-today] {
450
+ * A thin outline inside the day, and focus is a ring outside it, so a reader
451
+ * arrowing onto today sees two shapes. A day with marks keeps both, and the
452
+ * `fill` layout, whose days are tall, keeps its dot or its disc.
453
+ */
454
+ [data-ui-calendar] [data-part-day][data-today] {
486
455
  color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-text));
487
456
  font-weight: var(--slotted-font-weight-semibold, 600);
488
457
  }
489
458
 
490
- [data-ui='calendar'] [data-part='day']::before {
459
+ [data-ui-calendar]:not([data-layout='fill'])
460
+ [data-part-cell]:not([data-selected], [data-range-start], [data-range-end])
461
+ > [data-part-day][data-today] {
462
+ box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
463
+ var(--slotted-calendar-today-border-color, var(--slotted-tone-accent-border));
464
+ }
465
+
466
+ /* The disc says it, and the rest of the day keeps its own ink. */
467
+ [data-ui-calendar]:where([data-layout='fill'][data-today-mark='disc'])
468
+ [data-part-day][data-today] {
469
+ color: inherit;
470
+ }
471
+
472
+ [data-ui-calendar][data-layout='fill'] [data-part-day] {
473
+ /* The digit and the dot under it are not the same thing. */
474
+ gap: var(--slotted-space-1, 0.125rem);
475
+ }
476
+
477
+ [data-ui-calendar][data-layout='fill'] [data-part-day]::before {
491
478
  /* Reserved in every cell and painted in one, so the row keeps its line. */
492
479
  background-color: transparent;
493
480
  block-size: var(--slotted-space-2, 0.25rem);
@@ -500,25 +487,77 @@
500
487
  order: 1;
501
488
  }
502
489
 
503
- [data-ui='calendar'] [data-part='day'][data-today]::before {
490
+ [data-ui-calendar][data-layout='fill'] [data-part-day][data-today]::before {
504
491
  background-color: currentcolor;
505
492
  }
506
493
 
494
+ /**
495
+ * What falls on the day (`marks`): a dot under the number, in the mark's
496
+ * tone. The number of a day is in the middle of its cell with a mark and
497
+ * without one; on a chosen day the dot takes the day's ink.
498
+ */
499
+ [data-ui-calendar][data-layout='fill'] [data-part-day]:has(> [data-part-mark])::before {
500
+ display: none;
501
+ }
502
+
503
+ [data-ui-calendar] [data-part-mark] {
504
+ --_mark: var(--slotted-tone-accent-solid, currentcolor);
505
+
506
+ background-color: var(--_mark);
507
+ block-size: var(--slotted-space-2, 0.25rem);
508
+ border-radius: var(--slotted-radius-full, 9999px);
509
+ flex: 0 0 auto;
510
+ inline-size: var(--slotted-space-2, 0.25rem);
511
+ order: 1;
512
+ }
513
+
514
+ [data-ui-calendar]:not([data-layout='fill']) [data-part-mark] {
515
+ inset-block-end: var(--slotted-space-1, 0.125rem);
516
+ position: absolute;
517
+ }
518
+
519
+ [data-ui-calendar] [data-part-mark][data-tone='info'] {
520
+ --_mark: var(--slotted-tone-info-solid, currentcolor);
521
+ }
522
+
523
+ [data-ui-calendar] [data-part-mark][data-tone='success'] {
524
+ --_mark: var(--slotted-tone-success-solid, currentcolor);
525
+ }
526
+
527
+ [data-ui-calendar] [data-part-mark][data-tone='warning'] {
528
+ --_mark: var(--slotted-tone-warning-solid, currentcolor);
529
+ }
530
+
531
+ [data-ui-calendar] [data-part-mark][data-tone='danger'] {
532
+ --_mark: var(--slotted-tone-danger-solid, currentcolor);
533
+ }
534
+
535
+ [data-ui-calendar] [data-part-cell][data-selected] [data-part-mark] {
536
+ --_mark: currentcolor;
537
+ }
538
+
507
539
  /**
508
540
  * A day of the month either side. Quiet enough to read as context and legible
509
541
  * enough to press, because a reader who wants 1 October while looking at
510
542
  * September should be able to.
511
543
  */
512
- [data-ui='calendar'] [data-part='cell'][data-outside-month] [data-part='day'] {
544
+ [data-ui-calendar] [data-part-cell][data-outside-month] [data-part-day] {
513
545
  color: var(--slotted-calendar-outside-color, var(--slotted-text-muted, GrayText));
514
546
  }
515
547
 
548
+ /* The weakest ink of the six: a chosen, banded or marked day keeps its own. */
549
+ [data-ui-calendar]:where(:not([data-layout='fill'], [data-disabled]))
550
+ :where([data-part-cell][data-weekend])
551
+ [data-part-day] {
552
+ color: var(--slotted-calendar-weekend-color, var(--slotted-text-muted, GrayText));
553
+ }
554
+
516
555
  /**
517
556
  * Refused by the predicate. It stays focusable — `aria-disabled`, never
518
557
  * `disabled` — so a reader can arrow onto it and be told why, and the strike
519
- * is what says so without colour.
558
+ * is what says so without color.
520
559
  */
521
- [data-ui='calendar'] [data-part='cell'][data-unavailable] [data-part='day'] {
560
+ [data-ui-calendar] [data-part-cell][data-unavailable] [data-part-day] {
522
561
  color: var(--slotted-calendar-unavailable-color, var(--slotted-disabled-foreground));
523
562
  cursor: not-allowed;
524
563
  text-decoration: line-through;
@@ -543,24 +582,24 @@
543
582
  * from under both ends.
544
583
  *
545
584
  * The foundation already names the answer for a ground with no edge, and
546
- * `highlight` already draws it: mix the tone's `text` role, the one role
547
- * every scheme keeps legible over the surface, at the share
548
- * `--slotted-highlight-tint-opacity` holds. One share, one gesture, all
549
- * three schemes, and nothing to align across a row break.
550
- */
551
- [data-ui='calendar'] [data-part='cell'][data-in-range]::before,
552
- [data-ui='calendar'] [data-part='cell'][data-range-start]::before,
553
- [data-ui='calendar'] [data-part='cell'][data-range-end]::before {
585
+ * `highlight` already draws it: a tone mixed into the surface at the share
586
+ * `--slotted-highlight-tint-opacity` holds. A run takes twice the share, in
587
+ * the solid role its ends are filled with, so the band reads as theirs in
588
+ * both schemes, with nothing to align across a row break.
589
+ */
590
+ [data-ui-calendar] [data-part-cell][data-in-range]::before,
591
+ [data-ui-calendar] [data-part-cell][data-range-start]::before,
592
+ [data-ui-calendar] [data-part-cell][data-range-end]::before {
554
593
  background-color: var(
555
594
  --slotted-calendar-range-background,
556
595
  color-mix(
557
596
  in oklab,
558
- var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, 0.075) * 100%),
597
+ var(--slotted-tone-accent-solid) calc(var(--slotted-highlight-tint-opacity, 0.075) * 200%),
559
598
  transparent
560
599
  )
561
600
  );
562
601
  content: '';
563
- inset: 0;
602
+ inset: var(--slotted-border-width-thin, 1px) 0;
564
603
  position: absolute;
565
604
  }
566
605
 
@@ -569,46 +608,33 @@
569
608
  * begins and ends, and a square cut at either end reads as a run that was
570
609
  * clipped rather than one that stops.
571
610
  */
572
- [data-ui='calendar'] [data-part='cell'][data-range-start]::before {
573
- border-end-start-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));
574
- border-start-start-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));
611
+ [data-ui-calendar] [data-part-cell][data-range-start]::before {
612
+ border-end-start-radius: var(--_day-radius);
613
+ border-start-start-radius: var(--_day-radius);
575
614
  }
576
615
 
577
- [data-ui='calendar'] [data-part='cell'][data-range-end]::before {
578
- border-end-end-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));
579
- border-start-end-radius: var(--slotted-calendar-day-radius, var(--slotted-radius-sm, 4px));
616
+ [data-ui-calendar] [data-part-cell][data-range-end]::before {
617
+ border-end-end-radius: var(--_day-radius);
618
+ border-start-end-radius: var(--_day-radius);
580
619
  }
581
620
 
582
621
  /**
583
- * A run has two outer corners and no inner ones. The end that faces into the
584
- * range is square, so the solid meets the band edge to edge; the end that
585
- * faces out keeps the day's own radius. A range of one day is both ends at
586
- * once and stays round on both sides, which is why each rule excludes the
587
- * other.
622
+ * The band closes where the row does, and where the month does: a week, or a
623
+ * month with nothing drawn beyond it, ends the band as the run would.
588
624
  */
589
- [data-ui='calendar']
590
- [data-part='cell'][data-range-start]:not([data-range-end])
591
- [data-part='day'] {
592
- border-end-end-radius: 0;
593
- border-start-end-radius: 0;
625
+ [data-ui-calendar]:not([data-layout='fill']) [data-part-cell]:first-of-type::before,
626
+ [data-ui-calendar]:not([data-layout='fill'])
627
+ [data-part-cell][data-outside-month]:empty
628
+ + [data-part-cell]::before {
629
+ border-end-start-radius: var(--_day-radius);
630
+ border-start-start-radius: var(--_day-radius);
594
631
  }
595
632
 
596
- [data-ui='calendar']
597
- [data-part='cell'][data-range-end]:not([data-range-start])
598
- [data-part='day'] {
599
- border-end-start-radius: 0;
600
- border-start-start-radius: 0;
601
- }
602
-
603
- /**
604
- * Inside the run the day gives up its inset and its corners, so the tint is
605
- * continuous from one cell to the next and the run reads as one band rather
606
- * than as a row of tinted squares with gaps between them.
607
- */
608
- [data-ui='calendar']
609
- [data-part='cell']:is([data-in-range], [data-range-start], [data-range-end])
610
- [data-part='day'] {
611
- --_inset: 0px;
633
+ [data-ui-calendar]:not([data-layout='fill']) [data-part-cell]:last-of-type::before,
634
+ [data-ui-calendar]:not([data-layout='fill'])
635
+ [data-part-cell]:has(+ [data-part-cell][data-outside-month]:empty)::before {
636
+ border-end-end-radius: var(--_day-radius);
637
+ border-start-end-radius: var(--_day-radius);
612
638
  }
613
639
 
614
640
  /**
@@ -617,8 +643,7 @@
617
643
  * scheme where the band is faint, and it is the second half of the pair the
618
644
  * foundation asks for where there is no edge to make one with.
619
645
  */
620
- [data-ui='calendar'] [data-part='cell'][data-in-range] [data-part='day'] {
621
- border-radius: 0;
646
+ [data-ui-calendar] [data-part-cell][data-in-range]:not([data-unavailable]) [data-part-day] {
622
647
  color: var(--slotted-calendar-in-range-color, var(--slotted-tone-accent-text));
623
648
  }
624
649
 
@@ -632,46 +657,69 @@
632
657
  * end takes an edge in the accent's border role rather than the solid the
633
658
  * chosen end takes: a proposal is drawn as an outline, a choice as a fill.
634
659
  */
635
- [data-ui='calendar'] [data-part='cell'][data-preview]::before {
660
+ [data-ui-calendar] [data-part-cell][data-preview]::before {
636
661
  background-color: var(
637
662
  --slotted-calendar-preview-background,
638
663
  color-mix(
639
664
  in oklab,
640
- var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, 0.075) * 50%),
665
+ var(--slotted-tone-accent-solid) calc(var(--slotted-highlight-tint-opacity, 0.075) * 100%),
641
666
  transparent
642
667
  )
643
668
  );
644
669
  }
645
670
 
646
- [data-ui='calendar']
647
- [data-part='cell'][data-preview]:is([data-range-start], [data-range-end]):not([data-selected])
648
- [data-part='day'] {
671
+ [data-ui-calendar]
672
+ [data-part-cell][data-preview]:is([data-range-start], [data-range-end]):not([data-selected])
673
+ [data-part-day] {
649
674
  box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
650
675
  var(--slotted-calendar-preview-border-color, var(--slotted-tone-accent-border));
651
676
  color: var(--slotted-calendar-in-range-color, var(--slotted-tone-accent-text));
652
677
  }
653
678
 
679
+ /* ── Past the limit ───────────────────────────────────────────────────
680
+ *
681
+ * The days of a run longer than it may be, in the danger tone: the band, the
682
+ * numbers on it, and the end that closes it.
683
+ */
684
+ [data-ui-calendar] [data-part-cell][data-over]::before {
685
+ background-color: var(
686
+ --slotted-calendar-over-background,
687
+ color-mix(
688
+ in oklab,
689
+ var(--slotted-tone-danger-solid) calc(var(--slotted-highlight-tint-opacity, 0.075) * 200%),
690
+ transparent
691
+ )
692
+ );
693
+ }
694
+
695
+ [data-ui-calendar]
696
+ [data-part-cell][data-over][data-in-range]:not([data-unavailable])
697
+ [data-part-day] {
698
+ color: var(--slotted-calendar-over-color, var(--slotted-tone-danger-text));
699
+ }
700
+
654
701
  /* ── States ───────────────────────────────────────────────────────────
655
702
  *
656
703
  * Written strongest last, and each weaker one guarded against every stronger
657
704
  * one it can meet, which is the order `STATE_PRECEDENCE` sets.
658
705
  */
659
706
 
660
- [data-ui='calendar'] [data-part='day']:hover:not([data-disabled]),
661
- [data-ui='calendar'] [data-part='period']:hover:not(:disabled):not([data-disabled]),
662
- [data-ui='calendar'] [data-part='heading']:hover:not(:disabled):not([data-disabled]),
663
- [data-ui='calendar'] [data-part='previous']:hover:not(:disabled):not([data-disabled]),
664
- [data-ui='calendar'] [data-part='next']:hover:not(:disabled):not([data-disabled]) {
707
+ [data-ui-calendar] [data-part-day]:hover:not([data-disabled]),
708
+ [data-ui-calendar] [data-part-week-choice]:hover:not(:disabled):not([data-disabled]),
709
+ [data-ui-calendar] [data-part-period]:hover:not(:disabled):not([data-disabled]),
710
+ [data-ui-calendar] [data-part-heading]:hover:not(:disabled):not([data-disabled]),
711
+ [data-ui-calendar] [data-part-previous]:hover:not(:disabled):not([data-disabled]),
712
+ [data-ui-calendar] [data-part-next]:hover:not(:disabled):not([data-disabled]) {
665
713
  background-color: var(
666
714
  --slotted-calendar-hover-background,
667
715
  var(--slotted-tone-secondary-subtle-hover)
668
716
  );
669
717
  }
670
718
 
671
- [data-ui='calendar'] [data-part='day']:active:not([data-disabled]),
672
- [data-ui='calendar'] [data-part='period']:active:not(:disabled):not([data-disabled]),
673
- [data-ui='calendar'] [data-part='previous']:active:not(:disabled):not([data-disabled]),
674
- [data-ui='calendar'] [data-part='next']:active:not(:disabled):not([data-disabled]) {
719
+ [data-ui-calendar] [data-part-day]:active:not([data-disabled]),
720
+ [data-ui-calendar] [data-part-period]:active:not(:disabled):not([data-disabled]),
721
+ [data-ui-calendar] [data-part-previous]:active:not(:disabled):not([data-disabled]),
722
+ [data-ui-calendar] [data-part-next]:active:not(:disabled):not([data-disabled]) {
675
723
  background-color: var(
676
724
  --slotted-calendar-active-background,
677
725
  var(--slotted-tone-secondary-subtle-active)
@@ -684,18 +732,14 @@
684
732
  * a hole in the run, and the reader's own selection is what the band is
685
733
  * about — the pointer should deepen it, not neutralise it.
686
734
  */
687
- [data-ui='calendar']
688
- [data-part='cell'][data-in-range]
689
- [data-part='day']:hover:not([data-disabled]) {
735
+ [data-ui-calendar] [data-part-cell][data-in-range] [data-part-day]:hover:not([data-disabled]) {
690
736
  background-color: var(
691
737
  --slotted-calendar-range-hover-background,
692
738
  var(--slotted-tone-accent-subtle-hover)
693
739
  );
694
740
  }
695
741
 
696
- [data-ui='calendar']
697
- [data-part='cell'][data-in-range]
698
- [data-part='day']:active:not([data-disabled]) {
742
+ [data-ui-calendar] [data-part-cell][data-in-range] [data-part-day]:active:not([data-disabled]) {
699
743
  background-color: var(
700
744
  --slotted-calendar-range-active-background,
701
745
  var(--slotted-tone-accent-subtle-active)
@@ -707,12 +751,21 @@
707
751
  * and it is written after the two rules above for that reason: the guards
708
752
  * they carry are for `data-disabled`, and this state is the family's own.
709
753
  */
710
- [data-ui='calendar']
711
- [data-part='cell'][data-unavailable]
712
- [data-part='day']:hover:not([data-disabled]),
713
- [data-ui='calendar']
714
- [data-part='cell'][data-unavailable]
715
- [data-part='day']:active:not([data-disabled]) {
754
+ [data-ui-calendar] [data-part-cell][data-unavailable] [data-part-day]:hover:not([data-disabled]),
755
+ [data-ui-calendar]
756
+ [data-part-cell][data-unavailable]
757
+ [data-part-day]:active:not([data-disabled]) {
758
+ background-color: transparent;
759
+ }
760
+
761
+ /* A day that holds nothing to choose answers nothing, in the ink of any day. */
762
+ [data-ui-calendar] [data-part-cell][data-inert] [data-part-day] {
763
+ cursor: default;
764
+ }
765
+
766
+ [data-ui-calendar]
767
+ [data-part-cell][data-inert]:not([data-selected], [data-in-range])
768
+ [data-part-day]:is(:hover, :active):not([data-disabled]) {
716
769
  background-color: transparent;
717
770
  }
718
771
 
@@ -720,25 +773,47 @@
720
773
  * The chosen date. A fill rather than a ring, so it and today can be true at
721
774
  * once and still read as two facts.
722
775
  */
723
- [data-ui='calendar'] [data-part='cell'][data-selected] [data-part='day'],
724
- [data-ui='calendar'] [data-part='period'][data-selected] {
776
+ [data-ui-calendar] [data-part-cell][data-selected] [data-part-day],
777
+ [data-ui-calendar] [data-part-period][data-selected] {
725
778
  background-color: var(--slotted-calendar-selected-background, var(--slotted-tone-accent-solid));
726
779
  color: var(--slotted-calendar-selected-color, var(--slotted-tone-accent-on-solid));
727
780
  font-weight: var(--slotted-font-weight-semibold, 600);
728
781
  }
729
782
 
730
- [data-ui='calendar'] [data-part='day']:focus-visible,
731
- [data-ui='calendar'] [data-part='period']:focus-visible,
732
- [data-ui='calendar'] [data-part='heading']:focus-visible,
733
- [data-ui='calendar'] [data-part='previous']:focus-visible,
734
- [data-ui='calendar'] [data-part='next']:focus-visible {
783
+ [data-ui-calendar] [data-part-cell][data-over][data-selected] [data-part-day] {
784
+ background-color: var(
785
+ --slotted-calendar-over-selected-background,
786
+ var(--slotted-tone-danger-solid)
787
+ );
788
+ color: var(--slotted-calendar-over-selected-color, var(--slotted-tone-danger-on-solid));
789
+ }
790
+
791
+ /* Two chosen days side by side are two boxes: each gives the other a rule of air. */
792
+ [data-ui-calendar]:not([data-layout='fill'])
793
+ [data-part-cell][data-selected]:not([data-range-start], [data-range-end])
794
+ [data-part-day] {
795
+ inline-size: calc(var(--_cell-size) - var(--_inset) * 2);
796
+ margin-inline: var(--_inset);
797
+ }
798
+
799
+ [data-ui-calendar] [data-part-day]:focus-visible,
800
+ [data-ui-calendar] [data-part-period]:focus-visible,
801
+ [data-ui-calendar] [data-part-week-choice]:focus-visible,
802
+ [data-ui-calendar] [data-part-heading]:focus-visible,
803
+ [data-ui-calendar] [data-part-previous]:focus-visible,
804
+ [data-ui-calendar] [data-part-next]:focus-visible {
735
805
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
736
- /* Inside the cell rather than outside it: an offset ring on a grid of
737
- touching cells would overlap the four neighbours and read as a smear. */
738
806
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
739
807
  }
740
808
 
741
- [data-ui='calendar'][data-part='root'][data-invalid] {
809
+ /* Outside the day, where today's outline and the chosen ground are not, and
810
+ over its neighbours so the ring is never cut by one. */
811
+ [data-ui-calendar]:not([data-layout='fill'], [data-invalid]) [data-part-day]:focus-visible {
812
+ outline-offset: var(--slotted-border-width-thin, 1px);
813
+ z-index: 1;
814
+ }
815
+
816
+ [data-ui-calendar][data-part-root][data-invalid] {
742
817
  --slotted-focus-ring-color: var(
743
818
  --slotted-calendar-invalid-focus-ring-color,
744
819
  var(--slotted-focus-ring-color-invalid, Highlight)
@@ -746,17 +821,17 @@
746
821
  }
747
822
 
748
823
  /*
749
- * Width as well as colour (WCAG 1.4.1): in `high-contrast` the invalid ring
824
+ * Width as well as color (WCAG 1.4.1): in `high-contrast` the invalid ring
750
825
  * is the valid ring's black. The calendar has no frame to edge, so the ring
751
826
  * is where invalid shows, and it widens by the edge every invalid control
752
827
  * adds — inward, like the ring it replaces, so no neighbouring cell is
753
828
  * covered.
754
829
  */
755
- [data-ui='calendar'][data-part='root'][data-invalid] [data-part='day']:focus-visible,
756
- [data-ui='calendar'][data-part='root'][data-invalid] [data-part='period']:focus-visible,
757
- [data-ui='calendar'][data-part='root'][data-invalid] [data-part='heading']:focus-visible,
758
- [data-ui='calendar'][data-part='root'][data-invalid] [data-part='previous']:focus-visible,
759
- [data-ui='calendar'][data-part='root'][data-invalid] [data-part='next']:focus-visible {
830
+ [data-ui-calendar][data-part-root][data-invalid] [data-part-day]:focus-visible,
831
+ [data-ui-calendar][data-part-root][data-invalid] [data-part-period]:focus-visible,
832
+ [data-ui-calendar][data-part-root][data-invalid] [data-part-heading]:focus-visible,
833
+ [data-ui-calendar][data-part-root][data-invalid] [data-part-previous]:focus-visible,
834
+ [data-ui-calendar][data-part-root][data-invalid] [data-part-next]:focus-visible {
760
835
  --_invalid-ring: calc(
761
836
  var(--slotted-focus-ring-width, 2px) +
762
837
  var(--slotted-calendar-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px))
@@ -768,38 +843,39 @@
768
843
 
769
844
  /* A calendar the reader may read and not change: the days stop offering
770
845
  themselves, and nothing is faded, because the value is still real. */
771
- [data-ui='calendar'][data-part='root'][data-readonly] [data-part='day'],
772
- [data-ui='calendar'][data-part='root'][data-readonly] [data-part='period'] {
846
+ [data-ui-calendar][data-part-root][data-readonly] [data-part-day],
847
+ [data-ui-calendar][data-part-root][data-readonly] [data-part-period] {
773
848
  cursor: default;
774
849
  }
775
850
 
776
- [data-ui='calendar'][data-part='root'][data-disabled] {
851
+ [data-ui-calendar][data-part-root][data-disabled] {
777
852
  color: var(--slotted-calendar-disabled-color, var(--slotted-disabled-foreground));
778
853
  }
779
854
 
780
855
  /* Nothing a person cannot reach is painted in the tone that says "act on
781
856
  me": today keeps its dot, in the ink a disabled control is allowed. */
782
- [data-ui='calendar'][data-part='root'][data-disabled] [data-part='day'][data-today] {
857
+ [data-ui-calendar][data-part-root][data-disabled] [data-part-day][data-today] {
783
858
  color: var(--slotted-disabled-foreground);
859
+ --slotted-calendar-today-border-color: var(--slotted-disabled-foreground);
784
860
  }
785
861
 
786
- [data-ui='calendar'][data-part='root'][data-disabled]
787
- [data-part='cell'][data-selected]
788
- [data-part='day'] {
862
+ [data-ui-calendar][data-part-root][data-disabled]
863
+ [data-part-cell][data-selected]
864
+ [data-part-day] {
789
865
  background-color: var(--slotted-disabled-background);
790
866
  color: var(--slotted-disabled-foreground);
791
867
  }
792
868
 
793
- [data-ui='calendar'][data-part='root'][data-disabled] [data-part='day'],
794
- [data-ui='calendar'][data-part='root'][data-disabled] [data-part='period'],
795
- [data-ui='calendar'][data-part='root'][data-disabled] [data-part='previous'],
796
- [data-ui='calendar'][data-part='root'][data-disabled] [data-part='next'],
797
- [data-ui='calendar'][data-part='root'][data-disabled] [data-part='heading'] {
869
+ [data-ui-calendar][data-part-root][data-disabled] [data-part-day],
870
+ [data-ui-calendar][data-part-root][data-disabled] [data-part-period],
871
+ [data-ui-calendar][data-part-root][data-disabled] [data-part-previous],
872
+ [data-ui-calendar][data-part-root][data-disabled] [data-part-next],
873
+ [data-ui-calendar][data-part-root][data-disabled] [data-part-heading] {
798
874
  cursor: not-allowed;
799
875
  }
800
876
 
801
- [data-ui='calendar'] [data-part='previous']:disabled,
802
- [data-ui='calendar'] [data-part='next']:disabled {
877
+ [data-ui-calendar] [data-part-previous]:disabled,
878
+ [data-ui-calendar] [data-part-next]:disabled {
803
879
  color: var(--slotted-disabled-foreground);
804
880
  cursor: not-allowed;
805
881
  }
@@ -819,7 +895,7 @@
819
895
  * than on the root because a container cannot query itself.
820
896
  */
821
897
  @container slotted-calendar (max-width: 320px) {
822
- [data-ui='calendar'] [data-part='grids'] {
898
+ [data-ui-calendar] [data-part-grids] {
823
899
  --_month-gap: var(--slotted-space-4, 0.5rem);
824
900
  }
825
901
  }
@@ -830,17 +906,268 @@
830
906
  * run takes an edge here and only here — two rules the operating system
831
907
  * keeps, on a band that would otherwise be the page's own ground.
832
908
  */
833
- [data-ui='calendar'] [data-part='cell'][data-in-range]::before,
834
- [data-ui='calendar'] [data-part='cell'][data-range-start]::before,
835
- [data-ui='calendar'] [data-part='cell'][data-range-end]::before {
909
+ [data-ui-calendar] [data-part-cell][data-in-range]::before,
910
+ [data-ui-calendar] [data-part-cell][data-range-start]::before,
911
+ [data-ui-calendar] [data-part-cell][data-range-end]::before {
836
912
  border-block: var(--slotted-border-width-thin, 1px) solid
837
913
  var(--slotted-calendar-range-border-color, var(--slotted-tone-accent-border));
838
914
  }
839
915
 
916
+ /* The system draws a plate behind a text it forces, and the ink of a chosen
917
+ day is the plate's own color. */
918
+ [data-ui-calendar] [data-part-cell][data-selected] [data-part-day],
919
+ [data-ui-calendar] [data-part-period][data-selected] {
920
+ background-color: Highlight;
921
+ color: HighlightText;
922
+ forced-color-adjust: none;
923
+ }
924
+
840
925
  /* A proposal keeps its own distance from a choice here too: the pending
841
926
  band's edges are dashed where the chosen run's are solid. */
842
- [data-ui='calendar'] [data-part='cell'][data-preview]::before {
927
+ [data-ui-calendar] [data-part-cell][data-preview]::before {
843
928
  border-block-style: dashed;
844
929
  }
845
930
  }
931
+
932
+ /* ── Content in a day ─────────────────────────────────────────────────
933
+ *
934
+ * `layout="fill"` shares the inline size between the seven columns and
935
+ * takes the row height from `--slotted-calendar-day-height`, so a month
936
+ * view with content in its days fills its column instead of leaving the
937
+ * rest of it empty. The day keeps its states; its content stacks under the
938
+ * number: the marks, one per record, and a one-line figure at the end.
939
+ */
940
+ [data-ui-calendar][data-layout='fill'] {
941
+ inline-size: 100%;
942
+ }
943
+
944
+ [data-ui-calendar][data-layout='fill'] :is([data-part-grids], [data-part-grid]) {
945
+ inline-size: 100%;
946
+ }
947
+
948
+ [data-ui-calendar][data-layout='fill'] :is([data-part-week-header], [data-part-cell]) {
949
+ inline-size: auto;
950
+ }
951
+
952
+ [data-ui-calendar][data-layout='fill'] [data-part-day] {
953
+ margin: var(--_inset);
954
+ block-size: calc(
955
+ var(--slotted-calendar-day-height, calc(var(--_cell-size) * 2)) - var(--_inset) * 2
956
+ );
957
+ inline-size: auto;
958
+ justify-content: start;
959
+ padding-block: var(--slotted-space-2, 0.25rem);
960
+ }
961
+
962
+ /**
963
+ * The content at the start of the day: the number on the first line, the
964
+ * figure on the end of its own, the marks on the last. Every number stands in
965
+ * the middle of one box, so the digits of a column line up whatever their
966
+ * count, and today's disc is that box filled.
967
+ */
968
+ [data-ui-calendar][data-layout='fill'] [data-part-day-number] {
969
+ --_number: calc(1em + 2 * var(--slotted-space-2, 0.25rem));
970
+ }
971
+
972
+ [data-ui-calendar][data-layout='fill']:is([data-day-align='start'], [data-today-mark='disc'])
973
+ [data-part-day-number] {
974
+ block-size: var(--_number);
975
+ border-radius: var(--slotted-radius-full, 9999px);
976
+ display: grid;
977
+ flex: none;
978
+ min-inline-size: var(--_number);
979
+ place-items: center;
980
+ }
981
+
982
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-week-header] {
983
+ padding-inline: calc(
984
+ var(--slotted-border-width-thin, 1px) + var(--slotted-space-2, 0.25rem) +
985
+ var(--slotted-space-1, 0.125rem)
986
+ );
987
+ text-align: start;
988
+ }
989
+
990
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day] {
991
+ align-items: start;
992
+ padding-inline: var(--slotted-space-2, 0.25rem);
993
+ }
994
+
995
+ /* Under the middle of the number's box. */
996
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day]::before,
997
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-mark] {
998
+ margin-inline-start: calc(0.5em + var(--slotted-space-2, 0.25rem) / 2);
999
+ }
1000
+
1001
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-content] {
1002
+ align-items: start;
1003
+ flex: 1;
1004
+ min-block-size: 0;
1005
+ }
1006
+
1007
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-marks] {
1008
+ justify-content: start;
1009
+ padding-inline: var(--slotted-space-1, 0.125rem);
1010
+ }
1011
+
1012
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-marks]:last-child {
1013
+ margin-block-start: auto;
1014
+ }
1015
+
1016
+ /* Today in a disc: the dot leaves, its row with it. */
1017
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc'] [data-part-day]::before {
1018
+ display: none;
1019
+ }
1020
+
1021
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
1022
+ [data-part-cell]:not([data-outside-month])
1023
+ [data-part-day][data-today]
1024
+ > [data-part-day-number] {
1025
+ background-color: var(--slotted-calendar-today-background, var(--slotted-tone-accent-solid));
1026
+ color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-on-solid));
1027
+ }
1028
+
1029
+ /* On the ground of a chosen day the disc is that ground and its ink, exchanged. */
1030
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
1031
+ [data-part-cell][data-selected]:not([data-outside-month])
1032
+ [data-part-day][data-today]
1033
+ > [data-part-day-number] {
1034
+ background-color: var(--slotted-calendar-today-background, var(--slotted-tone-accent-on-solid));
1035
+ color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-solid));
1036
+ }
1037
+
1038
+ [data-ui-calendar][data-part-root][data-layout='fill'][data-today-mark='disc'][data-disabled]
1039
+ [data-part-cell]:not([data-outside-month])
1040
+ [data-part-day][data-today]
1041
+ > [data-part-day-number] {
1042
+ background-color: var(--slotted-disabled-background);
1043
+ color: var(--slotted-disabled-foreground);
1044
+ }
1045
+
1046
+ /* Between the days and not around them: the lines divide a plane, they frame nothing. */
1047
+ [data-ui-calendar][data-layout='fill'][data-lines]
1048
+ [data-part-week]
1049
+ > [data-part-cell]
1050
+ + [data-part-cell] {
1051
+ border-inline-start: var(--slotted-border-width-thin, 1px) solid
1052
+ var(--slotted-calendar-line-color, var(--slotted-border-subtle, ButtonBorder));
1053
+ }
1054
+
1055
+ [data-ui-calendar][data-layout='fill'][data-lines]
1056
+ [data-part-week]
1057
+ + [data-part-week]
1058
+ > [data-part-cell] {
1059
+ border-block-start: var(--slotted-border-width-thin, 1px) solid
1060
+ var(--slotted-calendar-line-color, var(--slotted-border-subtle, ButtonBorder));
1061
+ }
1062
+
1063
+ [data-ui-calendar] [data-part-day-content] {
1064
+ align-items: center;
1065
+ display: flex;
1066
+ flex-direction: column;
1067
+ gap: var(--slotted-space-1, 0.125rem);
1068
+ inline-size: 100%;
1069
+ min-inline-size: 0;
1070
+ order: 2;
1071
+ }
1072
+
1073
+ [data-ui-calendar] [data-part-day-marks] {
1074
+ display: flex;
1075
+ flex-wrap: wrap;
1076
+ gap: var(--slotted-space-1, 0.125rem);
1077
+ justify-content: center;
1078
+ }
1079
+
1080
+ [data-ui-calendar] [data-part-day-mark] {
1081
+ --_mark: var(--slotted-tone-accent-solid, currentcolor);
1082
+
1083
+ background-color: var(--_mark);
1084
+ block-size: var(--slotted-calendar-day-mark-size, var(--slotted-space-3, 0.375rem));
1085
+ border: var(--slotted-border-width-thin, 1px) solid var(--_mark);
1086
+ border-radius: var(--slotted-radius-full, 9999px);
1087
+ box-sizing: border-box;
1088
+ inline-size: var(--slotted-calendar-day-mark-size, var(--slotted-space-3, 0.375rem));
1089
+ }
1090
+
1091
+ [data-ui-calendar] [data-part-day-mark][data-hollow] {
1092
+ background-color: transparent;
1093
+ }
1094
+
1095
+ [data-ui-calendar] [data-part-day-mark][data-tone='info'] {
1096
+ --_mark: var(--slotted-tone-info-solid, currentcolor);
1097
+ }
1098
+
1099
+ [data-ui-calendar] [data-part-day-mark][data-tone='success'] {
1100
+ --_mark: var(--slotted-tone-success-solid, currentcolor);
1101
+ }
1102
+
1103
+ [data-ui-calendar] [data-part-day-mark][data-tone='warning'] {
1104
+ --_mark: var(--slotted-tone-warning-solid, currentcolor);
1105
+ }
1106
+
1107
+ [data-ui-calendar] [data-part-day-mark][data-tone='danger'] {
1108
+ --_mark: var(--slotted-tone-danger-solid, currentcolor);
1109
+ }
1110
+
1111
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-1'] {
1112
+ --_mark: var(--slotted-data-1);
1113
+ }
1114
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-2'] {
1115
+ --_mark: var(--slotted-data-2);
1116
+ }
1117
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-3'] {
1118
+ --_mark: var(--slotted-data-3);
1119
+ }
1120
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-4'] {
1121
+ --_mark: var(--slotted-data-4);
1122
+ }
1123
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-5'] {
1124
+ --_mark: var(--slotted-data-5);
1125
+ }
1126
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-6'] {
1127
+ --_mark: var(--slotted-data-6);
1128
+ }
1129
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-7'] {
1130
+ --_mark: var(--slotted-data-7);
1131
+ }
1132
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-8'] {
1133
+ --_mark: var(--slotted-data-8);
1134
+ }
1135
+
1136
+ [data-ui-calendar] [data-part-day-value] {
1137
+ align-self: end;
1138
+ font-size: var(--slotted-font-size-xs, 0.75rem);
1139
+ font-variant-numeric: tabular-nums;
1140
+ max-inline-size: 100%;
1141
+ overflow: hidden;
1142
+ padding-inline: var(--slotted-space-2, 0.25rem);
1143
+ text-overflow: ellipsis;
1144
+ white-space: nowrap;
1145
+ }
1146
+
1147
+ /* A figure cut to a digit says nothing: below this width only the marks stay. */
1148
+ @container slotted-calendar (max-inline-size: 28rem) {
1149
+ [data-ui-calendar] [data-part-day-value] {
1150
+ display: none;
1151
+ }
1152
+ }
1153
+
1154
+ @media (forced-colors: active) {
1155
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
1156
+ [data-part-cell]:not([data-outside-month])
1157
+ [data-part-day][data-today]
1158
+ > [data-part-day-number] {
1159
+ background-color: Highlight;
1160
+ color: HighlightText;
1161
+ forced-color-adjust: none;
1162
+ }
1163
+
1164
+ [data-ui-calendar] [data-part-day-mark] {
1165
+ background-color: CanvasText;
1166
+ border-color: CanvasText;
1167
+ }
1168
+
1169
+ [data-ui-calendar] [data-part-day-mark][data-hollow] {
1170
+ background-color: transparent;
1171
+ }
1172
+ }
846
1173
  }