-
Notifications
You must be signed in to change notification settings - Fork 280
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
Extract Gutenberg functionality #121
Conversation
- Moves all Gutenberg content into own module/folder - Extracts Gutenberg front-end CSS, loaded separately - Moves Gutenberg back-end styles to lib/gutenberg/ folder
@nickcernis Should we consider a different folder name than /gutenberg/ knowing that once 5.0 drops, it will no longer be called that? |
@bgardner Did you see this above? It looks like it's now hanging around.
|
@bgardner I'm happy to name it otherwise if it would feel safer, though! |
One possible option if we want to change it is just |
Based on what @nickcernis said, and the reality that everyone will know it as/continue calling it Gutenberg, I'm ok with it being left as is. |
Also, shame on me for not reading your original comment. :-P |
I like 'editor' as a fallback if it turns out we need one. And no problem, Brian! (I should write less.) :-) |
Causes styles in style-editor.css to be prefixed with .editor-block-list__block when imported by WordPress in the admin area, making it easier to re-use styles between the front-end and editor. Follows the methodology of the Twenty Nineteen theme.
When added via add_editor_style, rules are prefixed with .editor-block-list__block to help them override default editor styles.
I updated this branch to follow how Twenty Nineteen is using Gutenberg editor styles (which differs from the current advice in the theme support handbook , but is likely to be more accurate.) What's changedInstead of enqueueing all styles via That means we can use
You can see the “auto-prefixed” CSS that style-editor.css generates at the bottom of the admin area as an inline style injected via JS. Caveats
|
This PR moves Gutenberg functionality into its own folder with the goals of:
Method:
Noting that the Gutenberg name is apparently going to hang around longer, which is why I've named the folder “gutenberg” and not 'wordpress-editor' or 'blocks' or similar.
If this is merged:
Adding Gutenberg support to child themes without it would then involve:
cc @bgardner @dreamwhisper