Skip to content

Adding classes to backend editor-styles-wrapper for preview selections (mobile, tablet, desktop) #24488

@covertnine

Description

@covertnine

Brought this up in #19082 about adding class names to the editor-styles-wrapper when the preview width is changed so those of us with media queries on containers in that backend will be able to make adjustments in lieu of the upcoming iFrame solution.

Something like has-mobile-preview, has-tablet-preview-portrait etc.

Is your feature request related to a problem? Please describe.
It's related to backend container widths overflowing the preview area cause their widths are set with pixels and a media query for screen width, which technically isn't changing. See recordit below:

https://recordit.co/rT2hnNKYzT

Describe the solution you'd like
Adding classnames for each preview screen size to the editor-styles-wrapper element such as has-mobile-review or has-tablet-preview

I'd also suggest adding more previews: phone landscape and tablet landscape.

Describe alternatives you've considered
This would be a bridge solution to the iframe editor is completed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions