Skip to content

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

Closed

Description

@mirka

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.

Activity

  1. self-assigned this
    on Feb 11, 2022
  2. mirka commented on Feb 11, 2022

    @mirka
    MemberAuthor

    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
  3. 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[/+] on Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Browser IssuesIssues or PRs that are related to browser specific problems[Package] Components/packages/components[Status] In ProgressTracking issues with work in progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions