Skip to content

Pickers calendar day size token - #23315

Open
Syed-Ali-Abbas-Zaidi wants to merge 4 commits into
mui:masterfrom
Syed-Ali-Abbas-Zaidi:pickers-calendar-day-size-token
Open

Pickers calendar day size token#23315
Syed-Ali-Abbas-Zaidi wants to merge 4 commits into
mui:masterfrom
Syed-Ali-Abbas-Zaidi:pickers-calendar-day-size-token

Conversation

@Syed-Ali-Abbas-Zaidi

Copy link
Copy Markdown

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 🔺+87B(+0.04%) 🔺+100B(+0.17%)
@mui/x-date-pickers-pro ▼-133B(-0.05%) 🔺+102B(+0.13%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 0B(0.00%) 0B(0.00%)
@mui/x-scheduler-premium 0B(0.00%) 0B(0.00%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

The previous approach made the calendar dimensions follow the `--PickerDay-*`
variables directly, which required two breaking changes: the day slots stopped
declaring the variables, and `--PickerDay-horizontalMargin` started requiring a
unit because it fed a `calc()`.

Instead, add a calendar-level `--PickerCalendar-daySize` token that drives the
surrounding dimensions, and keep `--PickerDay-size` declared on the day sourced
from it, so ancestor values reach the day while day-level overrides keep working.
The grid track is derived from the day size plus a constant margin, so the
margin variable never enters a `calc()` and unitless values keep working. The
week rows are centered, so a margin override renders like it does today.
@Syed-Ali-Abbas-Zaidi
Syed-Ali-Abbas-Zaidi force-pushed the pickers-calendar-day-size-token branch from 4820f7b to 627a61b Compare August 7, 2026 07:52
@zannager zannager added the scope: pickers Changes related to the date/time pickers. label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: pickers Changes related to the date/time pickers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants