You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some CSS rules applied in the editor override theme styles #17511
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.
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!
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?
Activity
ItsJonQ commentedon 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 commentedon Feb 12, 2020
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 commentedon Sep 28, 2022
Closing this due to a lack of activity over the last three years.