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

Inline styles vs classes #39311

Closed
vyskoczilova opened this issue Mar 9, 2022 · 2 comments
Closed

Inline styles vs classes #39311

vyskoczilova opened this issue Mar 9, 2022 · 2 comments

Comments

@vyskoczilova
Copy link
Contributor

Hi,

With the 5.9 WP release we're facing an issue with disappearing CSS classes like is-content-justification-center and inline styles are used instead of it.

Is there a way to prefer CSS classes instead of inline styles? To revert this "feature"? We're using theme.json because of Gutenberg configuration (and for example ability to kill duotones etc.) and this "enabled" us as well inline CSS.

Is there any filter or option to enable it? For custom coded templates, it's a disaster (same as removing the inner block from group block - not a big problem, but at least worth mentioning). Now we've added a few filters for rendering block, but this is just unsustainable. CSS classes need to stay unchanged.

I believe it's not just a matter of custom-coded templates but the fact, that you can't cache inline styles by browser and you're downloading them over and over again. You can customize them either by CSS.

Thanks!

@glendaviesnz
Copy link
Contributor

Thanks for reporting this @vyskoczilova. There is a wider discussion about the issues you raise here, so I am going to close this in favour of that issue - please feel free to add an additional comment there if you don't feel that the points you raise are already adequately covered.

@benplum
Copy link

benplum commented Mar 30, 2022

Is the answer that the some blocks no longer output the alignment classes in favor of inline style blocks? Where are changes like this documented? Developing WP is giving me serious whiplash, every update means spending weeks patching all client sites running Gutenberg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants