-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Editor width is overridden by the default width at bottom in source code of editor. #9894
Comments
Tested and confirmed that adding a stylesheet then adding CSS to |
Try using the new editor styles instead see https://wordpress.org/gutenberg/handbook/extensibility/theme-support/#editor-styles |
@youknowriad forgive me for the basic question, what do I do next after adding |
Figured it out (with some help!), to update the content width for the editor in a given theme:
|
As far as I can tell, and even though this works, doing
Based on my testing so far, the editor stylesheet gets loaded in the editor with
Is loaded in my editor stylesheet as:
Basically the body is being stripped and replaced with .editor-block-list_block to each line. Therefore, this does not work and is being overridden with the default Gutenberg inline stylesheet, which should be:
....which is what shows in the default inline <style>...</style> at the bottom of the source code. |
The documentation probably needs to be updated! |
Assigning a fixed width here doesn't really work very well. I think you still need to tackle the wrappers noted in the current documentation, as mentioned by @Mocha365. Those will enable a nice fluid width editor area at different sizes (wide and full width). But to make those wrappers work now you need to use !important unfortunately as they are being overwritten (whereas they didn't use to be). |
@Mocha365 @onetrev I'm circling back to note that the documentation for how to set editor width is getting an update in #10956. 😍 Check it out: #10956 (comment) |
Is it possible to set multiple widths depending on the page/post template being used? I have post/pages with sidebar and without, so the width differs. I would like the editor to be as close to the live version as possible. But so far it seems like you can only set the width using exactly
|
Describe the bug
My custom stylesheet for the Gutenberg editor works and loads, but noticed that my editor width is being overridden with the default width of 610px. Looking at the source code, the default style loads at the bottom of the page, therefore, my custom width is ignored unless I add !important to my own width.
To Reproduce
Steps to reproduce the behavior:
Adding this to a theme's editor css file for gutenberg:
Expected behavior
The editor should be resized from the default 610px to 825px.
Screenshots
See the attached image below in Additional info.
Desktop (please complete the following information):
Smartphone (please complete the following information):
N/A
Additional context
UPDATE: Actualy, the inline styles from the default source are causing issues because it's loading at the bottom of the source code. Even my fonts are being overridden. The solution here is to not have this inline stylesheet load at the end of the source.
The text was updated successfully, but these errors were encountered: