-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Frontend styles for some blocks are only partially present #3515
Comments
There are couple of blocks which have this same issue. At least quote and separator
|
See #3262 for some more context on when this was changed. I think we might want to allow a theme to reuse gutenberg styles for these generic blocks (blockquote, hr, etc) if they want to. |
If themes need to opt in to Gutenberg-specific styles, then those styles should only be shown in the editor once the theme has opted in. Somewhat similar to #2595 in that regard. The current behavior is confusing and not WYSIWYG. |
@nylen it is an interesting situation, I'm not sure about what is the best default. @jasmussen seemed to think it was ok for the editor to have some basic styles even if not reflected. Whatever we do there will have to be some involvement from themes — the question is whether that involvement will come from old themes or new themes. The natural thing would be to opt for new themes needing the changes, but that is debatable. |
For old themes WYSIWYG is pretty hard anyway. Starting with font-family. |
I would ask for opinions by @melchoyce and @karmatosed also. But my opinion is this: as a visual editor with no theme editor styles loaded, it's always going to be a balancing act. Bold text should be bold images that are right-aligned should be right aligned, all that even if the theme hasn't explicitly opted into this behavior. For the new image styles we added, wide and full-wide, we require opt-in before those style buttons are shown on the image blocks quick toolbar. This is because these are not basic styles that we can assume that the WordPress theme will support out of the box. I emphasize assume exactly because it's a balancing act, where we as designers and developers have to evaluate a style on a case by case basis:
Edit: I misspoke, turns out basic editor style support is already present, even though improvements can definitely still be made. The point still stands for having basic styles to communicate intent, for themes that do not provide this editor style. |
This is a good foundation to go by. I agree with your list @jasmussen of what we can assume:
A side point, we need to do a lot of theme testing, @samikeijonen would you be up for helping that? It's important we test Gutenberg in as many themes as possible over just assuming. |
Sure, I can help testing. My testing would also include building "Gutenberg ready" themes. |
@samikeijonen that would be great testing, thank you for helping with the project. |
The specific theme in use for this example is Twenty Seventeen. Given that:
I think this specific example could use some more attention. |
Default themes are "easy" in a sense that they are updated before the new features (new editor) kicks in. In this case it would mean style tweaks here and there. |
This issue absolutely deserves more attention. Front-end styles in general are overdue. We'll get to it, I think we should do a whole release around it. |
Is Closed the appropriate status for this issue, then? |
Ideally we'd have separate specific issues for frontend styles, and by "front-end styles in general" I'm referering also to the Gutenberg theme being in a better place. |
For blocks shipped by default with the Gutenberg editor, I would mostly expect the same styles to be present on the frontend as in the editor. However, for the Quote block, this is not the case:
The same section of this post on the front-end:
The text was updated successfully, but these errors were encountered: