Skip to content

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

@markhowellsmead

Description

@markhowellsmead

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Custom Editor StylesFunctionality for adding custom editor styles[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions