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

Some CSS rules applied in the editor override theme styles #17511

Closed
markhowellsmead opened this issue Sep 22, 2019 · 3 comments
Closed

Some CSS rules applied in the editor override theme styles #17511

markhowellsmead opened this issue Sep 22, 2019 · 3 comments
Labels
[Feature] Custom Editor Styles Functionality for adding custom editor styles [Feature] Themes Questions or issues with incorporating or styling blocks in a theme.

Comments

@markhowellsmead
Copy link

Some of the rules which are provided to style the HTML elements which are only used for editor functionality override the usual CSS cascade. This forces Theme/Block authors to write more complicated CSS than is necessary.

An example is .wp-block-cover .block-editor-block-list__block {color: #f8f9f9;}. This is a specific colour assignment to an element which is only in the editor. However, this means that all children of .block-editor-block-list__block will inherit this colour. The much simpler CSS standard colour inheritance - which allows me to set the text colour on the outer .wp-block-cover and have it inherit down the tree - is broken.

@talldan talldan added the [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. label Sep 24, 2019
@jasmussen jasmussen added the [Feature] Custom Editor Styles Functionality for adding custom editor styles label Oct 1, 2019
@ItsJonQ
Copy link

ItsJonQ commented Feb 12, 2020

@markhowellsmead Thank you for raising this!

This CSS specificity fighting between Blocks x Themes is one of the main problems that the Global Styles focus is attempting to solve.

From our initial research/testing, we have ideas of how the style relationships between blocks, themes, and user configurations can live harmoniously (the dream)

We've started with the very first phase of development. We're still quite ways off from implementing it into all blocks, as well as blocks x themes, but we'll get there!

@markhowellsmead
Copy link
Author

Thanks for the feedback @ItsJonQ. Good to know that a solution is on the way. I guess you don't need me to cross-reference other issues along similar lines, such as #17069?

@markhowellsmead
Copy link
Author

Closing this due to a lack of activity over the last three years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Custom Editor Styles Functionality for adding custom editor styles [Feature] Themes Questions or issues with incorporating or styling blocks in a theme.
Projects
None yet
Development

No branches or pull requests

4 participants