-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 themes to opt-in to font-smoothing via theme.json #35934
Comments
Hi @kjellr I use theme.json for almost all the themes I am currently working on. This looks like an excellent feature to add. Let me know if I can take on adding this feature in the Gutenberg. |
Hey @sagarnasit — go for it! I think a PR would be worthwhile. |
Great! @kjellr This feature would go in
I have a couple of questions in mind.
|
I do not think we need any UI/settings for this.
I think just a global toggle would make sense for now. |
Looks like a good addition to me. I might even make it opt out... |
Can this be kept as opt in, please? Those two lines of CSS are not supported for many users. For those it does affect, there's also the potential for a11y issues when applied to smaller text and/or text with a light font weight. |
@chthonic-ds Yes, this feature would be opt-out by default. |
Just throwing my two cents in:
Given the simplicity of this PR/issue, I hope it finds its way into Gutenberg 11.9, and consequently 5.9. Huge win, IMO if it does. |
Closing as per the thoughts in #36092 (comment). |
As a said note, there are critics of anti-aliasing font smoothing (-moz-osx-font-smoothing: grayscale; The Twenty Twenty Two's CSS has antialiasing enabled. Perhaps this is a mistake. |
One reset-adjacent feature that many themes opt-into is font smoothing. Sure, they could do this with a couple lines of CSS, but I wonder if this is common enough that we should just allow it to be a single line in theme.json instead.
The past three default themes (Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One) all opted into this via CSS, and I'd like to do it for Twenty Twenty-Two as well.
The text was updated successfully, but these errors were encountered: