Skip to content
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

Some components don't render in the intended font stack in Chrome #37555

Closed
mirka opened this issue Dec 21, 2021 · 1 comment · Fixed by #38969
Closed

Some components don't render in the intended font stack in Chrome #37555

mirka opened this issue Dec 21, 2021 · 1 comment · Fixed by #38969
Assignees
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress

Comments

@mirka
Copy link
Member

mirka commented Dec 21, 2021

InputControl does not have an explicit font-family on its <input> element, so depending on the user agent stylesheet it could be rendered in an unintended font.

In my environment (Chrome on Mac), the expected font is system-ui, but instead it's rendered in Arial. (TextControl, on the other hand, does have an explicit font-family set, so is consistent across browsers.)

Any components based on InputControl are likely also affected.

@mirka mirka added [Package] Components /packages/components Browser Issues Issues or PRs that are related to browser specific problems labels Dec 21, 2021
@mirka mirka self-assigned this Feb 11, 2022
@mirka
Copy link
Member Author

mirka commented Feb 11, 2022

This problem doesn't manifest in contexts where the core WP forms.css is loaded (i.e. wp-admin), since that includes some normalizing rules:

// forms.css
input, select, textarea, button {
  font-family: inherit;
}

Directly affected components

  • Button
  • ColorPalette
  • ComboboxControl
  • DateTimePicker
  • FormTokenField
  • InputControl
  • SelectControl
  • ToggleGroupControl

@mirka mirka changed the title InputControl doesn't render in the intended font stack in Chrome Some components don't render in the intended font stack in Chrome Feb 11, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant