Skip to content

Support specifying _FontScaleOptions globally #7124

Closed

Description

@y1j2x34

Is your feature request related to a problem? Please describe.

I'm currently developing a browser extension. In my extension, I use Shadow DOM to isolate styles to ensure my extensions render correctly in various web environments. However, I've run into an issue that I hope can be improved.
The problem is that, due to the inability to globally specify the _FontScaleOptions of the euiFontSize method, the font-size of some components uses rem units by default (https://github.com/elastic/eui/blob/main/src/components/tabs/tab.styles.ts). This caused my extension to not render correctly on some webpages with font sizes set.

Activity

  1. added
    low hanging fruit
    on Aug 28, 2023
  2. JasonStoltz commented on Aug 28, 2023

    @JasonStoltz
    Contributor

    Labeling this as high priority and low effort. We think this would be a quick win so plan to address this shortly.

  3. 1Copenut commented on Aug 28, 2023

    @1Copenut
    Contributor

    Thank you for the issue submission @y1j2x34. The EUI team is working on this in a related pull request.

  4. y1j2x34 commented on Aug 29, 2023

    @y1j2x34
    ContributorAuthor

    Thank you for the issue submission @y1j2x34. The EUI team is working on this in a related pull request.

    I am delighted that this issue is being promptly addressed. Thank you for your proactive handling.

  5. cee-chen commented on Aug 29, 2023

    @cee-chen
    Contributor

    #7133 will release next Monday. Once it's available, you can upgrade and modify your usage like so:

    <EuiProvider modify={{ font: { defaultUnits: 'px' } }}>
      <YourApp />
    </EuiProvider>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

low hanging fruit

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions