Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Try optimizing the default column width #7112
This PR does a few things.
I'm open to suggestions as to the width of the main column — this is a suggestion for now. But it would be nice to choose a nice and round number other than 608, and apply it to both the visual and the text editor.
Jun 6, 2018
Seems the default max-width will also have to be changed in https://github.com/WordPress/gutenberg/blob/master/editor/store/defaults.js#L62.
Unless I'm missing something https://wordpress.org/gutenberg/handbook/extensibility/theme-support/#changing-the-width-of-the-editor seems to be missing the fact that
Also, allowing plugins and themes to set arbitrary max-width for the editor will need more UI tests. What happens to the UI when it is 380px wide? What about 870px or 1024px? :)
Generally thinking that allowing plugins and themes to (drastically) change the editor appearance is not a good idea. Gutenberg is not WYSIWYG, it doesn't have to be. Letting themes and plugins change some of the styles is fine, allowing "arbitrary CSS" -- not so much. Background: about 1/4 of the problems reported in support forums with the classic editor are caused by editor-style.css :)
Edit: actually this is probably worth a new issue.
added a commit
this pull request
Jun 7, 2018
referenced this pull request
Jun 7, 2018
Thank you! PR in #7198.
I'm not sure how to do that — can you help me here? Thanks.
I disagree that allowing themers to style the editor is a bad idea, especially in an editor whose main concept is to allow greater visual freedom, the disconnect between the admin and the end result can be jarring, and for that reason, direct manipulation and WYSIWYG have been part of the Gutenberg vision for more than a year. Of course we need to ensure a good, accessible, basic layout style. We can even consider a user option to turn off an theme editor style if people prefer the default Gutenberg style, just like how web browsers let you override website styles. That could be worth a new ticket.
Should we expose another filter on PHP side to make it customizable, similar to what we do with colors?
Uh, sorry, I opened #7180 for using either CSS or the
I don't mean we should completely disallow that, but imho it would be much better to have some strict restrictions on what can be added/changed. There are several reasons: