[scheduler] Remove unused --has-scroll CSS variable from DayTimeGrid#22799
Merged
rita-codes merged 2 commits intoJun 12, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
Contributor
Author
|
@rita-codes @zannager Kindly have a review on this pr. Thanks! |
--has-scroll CSS variable from DayTimeGrid
mbrookes
pushed a commit
to mbrookes/mui-x
that referenced
this pull request
Jun 27, 2026
…id` (mui#22799) Co-authored-by: Rita <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22783
Summary
DayTimeGridContainerdeclared a--has-scrollCSS custom property that nothing reads. The real scroll state is driven by thedata-has-scrollattribute, set from the ReacthasScrollstate and consumed by the[data-has-scroll]selectors in the same file. The variable was also hardcoded to a static1, so it would not reflect the actual state even if something did read it. This removes the dead declaration.Change
A single line removed from the
DayTimeGridContainerstyled block:Why this is safe
var(--has-scroll)returns no consumers. The only--has-scrollreference was the declaration itself.--has-scroll-xvariable in the premium timeline (EventTimelinePremiumContent.tsx) is a different property and is not touched.data-has-scrollattribute path (lines 79, 82, 102, 175, 179, 428, 453) is unchanged, so there is no behavior change.Testing
No new test was added. The variable is never read so there is no observable behavior to assert, and a test checking that a CSS variable is absent would not reflect how this repo validates changes. Verification instead:
pnpm --filter "@mui/x-scheduler" run typescriptpasses.pnpm eslintpasses.pnpm test:unit --project "x-scheduler" --runpasses (18 files, 168 tests), including the existingdata-has-scrolltests inWeekView.test.tsx, which behave identically.--has-scrollno longer appears anywhere in the repo.Changelog
@mui/x-scheduler--has-scrollCSS variable fromDayTimeGrid.Checklist