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

Allow the omission of font sizes in inline styles #29425

Closed
Azragh opened this issue Mar 1, 2021 · 1 comment
Closed

Allow the omission of font sizes in inline styles #29425

Azragh opened this issue Mar 1, 2021 · 1 comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Enhancement A suggestion for improvement.

Comments

@Azragh
Copy link

Azragh commented Mar 1, 2021

What problem does this address?

The problem is that the inline styles in the editor have fixed pixel values which can only be overwritten by !important. Since I don't want to write my code twice, and my themes are based on different font sizes depending on breakpoints, the current solution is suboptimal. I can adjust the values in the editor-font-sizes array to match the em-sizes - but doing this manually for each new website is extremely cumbersome and error-prone. In addition, the fonts do not scale with the mobile previews, which would already happen with the new font size of the wrapper.

What is your proposed solution?

It would be good to be able to specify the font sizes in the editor-font-sizes array as em, but I understand that this is extremely difficult to implement.

It would already help me if one could basically specify not to get font sizes as inline styles in the editor. This way I could set default values of 12, 14, 16 etc., which then don't necessarily have to be adjusted for new websites though, as the values would then only refer to the sizes in the font-sizes dropdowns and thus no longer have any influence on the design.

Just found a comment of mine that addresses this point: #6454 (comment) As you can see from the whole discussion, many would benefit from the option, as the default sizes can then simply be overwritten via the editor stylesheet without having to use !important for every breakpoint.

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. CSS Styling Related to editor and front end styles, CSS-specific issues. labels Mar 3, 2021
@Azragh
Copy link
Author

Azragh commented Nov 7, 2022

Closing this as it's now possible to pass css variables to theme.json.

@Azragh Azragh closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants