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

Multiple editor widths #11288

Closed
sebrosen opened this issue Oct 31, 2018 · 3 comments
Closed

Multiple editor widths #11288

sebrosen opened this issue Oct 31, 2018 · 3 comments
Labels
[Feature] Custom Editor Styles Functionality for adding custom editor styles [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Developer Documentation Documentation for developers [Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@sebrosen
Copy link

sebrosen commented Oct 31, 2018

I'm trying to define multiple widths for the Gutenberg editor depending on the post/page template. I have a full-width page template and would like the editing experience to be as close to the live page.

Now the issue is that I can only seem to define one width for the editor using the .wp-block class. I'm following this method: https://wordpress.org/gutenberg/handbook/extensibility/theme-support/#changing-the-width-of-the-editor

.wp-block {
    max-width: 720px;
}

I've tried adding a selector in front of the .wp-block class, for example:

.wp-block {
    max-width: 720px;
}
.page-template-fullwidth .wp-block {
    max-width:1080px;
}

But unfortunately that doesn't work. It seems like the only possible way to change the width is by only using .wp-block

Any ideas on how to implement multiple different editor widths?

Thank you!

@earnjam earnjam added the [Type] Help Request Help with setup, implementation, or "How do I?" questions. label Oct 31, 2018
@manake
Copy link

manake commented Dec 9, 2018

I have the same question. Does anyone know?

@designsimply designsimply added Needs Technical Feedback Needs testing from a developer perspective. [Type] Developer Documentation Documentation for developers [Feature] Custom Editor Styles Functionality for adding custom editor styles labels Jan 9, 2019
@designsimply
Copy link
Member

I posted an explanation of the current situation and a workaround code example at #12874 (comment). Please have a look!

@designsimply designsimply added [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed and removed Needs Technical Feedback Needs testing from a developer perspective. labels Jan 10, 2019
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 [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Developer Documentation Documentation for developers [Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

5 participants