Skip to content

Sidebar panels added by plugins may inherit styles from WordPress that should be reset #8616

@afercia

Description

@afercia

Noticed while working on #8554 /Cc @jasmussen

Seems that sidebar panels added by plugin may inherit (depending on their implementation) styles from WordPress that could lead to unexpected results.

For example, when using the Ctrl + backtick keyboard shortcut to navigate through the main regions, the focus style applied around the sidebar may look wrong:

screen shot 2018-08-06 at 19 27 58

See the last sidebar panel that overlaps the focus style. This specific panel uses some markup from the WordPress meta boxes. After a quick investigation, seems two position: relative CSS declarations are responsible for this:

from Gutenberg:

.edit-post-meta-boxes-area {
    position: relative;
}

from WordPress

.postbox {
    position: relative;
    ...

Potentially, there could be other inherited CSS rules that could produce unexpected results. Soem special care should be taken in overriding these rules for the panels in the sidebar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions