-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(datepicker): Value of calendar text size CSS variable is overriden by the user agent stylesheet #29608
Labels
area: material/datepicker
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
crisbeto
added
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
area: material/datepicker
and removed
needs triage
This issue needs to be triaged by the team
labels
Aug 20, 2024
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 20, 2024
We were setting the `calendar-text-font` and `calendar-text-size` tokens at the top level of the calendar which meant that it wasn't being picked up in the cells, because they have `button` elements which have user agent styles. These changes resolve the issue by explicitly setting the tokens. Also fixes that the font size was too big in M3. Fixes angular#29608.
@crisbeto Thank you so much! |
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 20, 2024
We were setting the `calendar-text-font` and `calendar-text-size` tokens at the top level of the calendar which meant that it wasn't being picked up in the cells, because they have `button` elements which have user agent styles. These changes resolve the issue by explicitly setting the tokens. Also fixes that the font size was too big in M3. Fixes angular#29608.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 20, 2024
We were setting the `calendar-text-font` and `calendar-text-size` tokens at the top level of the calendar which meant that it wasn't being picked up in the cells, because they have `button` elements which have user agent styles. These changes resolve the issue by explicitly setting the tokens. Also fixes that the font size was too big in M3. Fixes angular#29608.
crisbeto
added a commit
that referenced
this issue
Aug 20, 2024
…29610) We were setting the `calendar-text-font` and `calendar-text-size` tokens at the top level of the calendar which meant that it wasn't being picked up in the cells, because they have `button` elements which have user agent styles. These changes resolve the issue by explicitly setting the tokens. Also fixes that the font size was too big in M3. Fixes #29608.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 20, 2024
…ngular#29610) We were setting the `calendar-text-font` and `calendar-text-size` tokens at the top level of the calendar which meant that it wasn't being picked up in the cells, because they have `button` elements which have user agent styles. These changes resolve the issue by explicitly setting the tokens. Also fixes that the font size was too big in M3. Fixes angular#29608.
crisbeto
added a commit
that referenced
this issue
Aug 21, 2024
…29610) (#29615) We were setting the `calendar-text-font` and `calendar-text-size` tokens at the top level of the calendar which meant that it wasn't being picked up in the cells, because they have `button` elements which have user agent styles. These changes resolve the issue by explicitly setting the tokens. Also fixes that the font size was too big in M3. Fixes #29608.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: material/datepicker
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
No response
Description
The
--mat-datepicker-calendar-text-size
CSS variable of Angular Material's datepicker isn't applied properly because the font size of children element is overriden by the browser user agent style for thebutton
element.Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-dmhaw2?file=src%2Fglobal-styles.scss
Steps to reproduce:
global-styles.scss
, change the value of the--mat-datepicker-calendar-text-size
and note that it doesn't affect the size of the day values of the datepicker.Expected Behavior
I should be able to configure the font-size of the day values of the datepicker by setting a different value to the
--mat-datepicker-calendar-text-size
CSS variable.Actual Behavior
When configuring the font-size of the day values of the datepicker by setting a different value to the
--mat-datepicker-calendar-text-size
CSS variable, no change occurs.Environment
The text was updated successfully, but these errors were encountered: