-
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
Inaccurate error messaging with block-level colors when 'Use theme styles' is off #68887
Comments
While I understand the frustration, I don't see how the editor can calculate the correct color contrast for the theme when "Use theme styles" is turned off. Similar feedback will be different or incorrect if the theme and editor styles differ. One option I can think of is disabling the contrast checker when "Use theme styles". @afercia, what do you think? |
@Mamaduka I'm missing the context for the 'Use theme styles' preference. I could track its introduction till #22494 but I'm not fully understanding why the editor should ever allow to disable theme styles in the first place. |
@afercia, unfortunately, I don't have any additional context besides that PR. Maybe @youknowriad or @mtias can clarify the feature. |
This is a writing tool that was introduce a long time ago to allow users to write content without being distracted by opinionated styles that may come from the theme. A lot of people don't want the typography or the colors defined by the theme to interfere when they're focused on writing. It's a common feature in several writing editors. I think it shares some of the goals of the distraction free mode. |
Also in the beginning (before many of the block style options were introduced) there were lots of styling conflicts. |
Thanks @youknowriad yes I noticed it was introduced in #22494 (if I'm not wrong) in the context of other 'writing flow options'.
You make a good point here. Distraction free mode doesn't disable the background color provided by the theme though. I thought the editor was always supposed to provide a preview that is as close as possible to the front end. Disabling 'Use theme styles' goes in the opposite direction and I wonder whether it still makes sense. It's not a case that this preference is not available in the Site editor, where users do need to see the theme styles. Thinking at the ongoing effort to unify the editors, how this aligns with the reunification? I tend to think disabling 'Use theme styles' makes only sense in a content writing flow. When in the future there will be only one editor, and only on set or user preferences, should this feature be provided in another mode? Overall, I'd really prefer to not disable the contrast checker. Rather, I would love to see the contrast checker work reliably wherever text and background can be changed by the users, whatever the edited object is (content, template, pattern, whatever). I wouldn't object to disable the contrast checker in modes that are only focused on writing content. As such, I'm not sure disabling theme styles should be a user preference any longer. Would it make sense to move it to an editor mode? |
Description
This is a replica of the following issue reported here:
Automattic/wp-calypso#86467
Quick summary
When 'Use theme styles' is toggled off in the editor's settings, applying different colours at a block-level can lead to inaccurate, misleading error messages via the colour contrast checker and an overall confusing experience.
As expanded upon in the Logs or notes section, I have only been able to reproduce this within Calypso. In /wp-admin for self-hosted sites, the contrast checker appears to be disabled all together when 'Use theme styles' is toggled off.
Experiment with dark text
What you expected to happen
I expected the in-editor contrast warnings to be accurate and for any content included in the post to be legible on the site's font-end.
Potentially relevant: Automattic/wp-calypso#86082
Step-by-step reproduction instructions
Steps to reproduce
Setup: Enable a theme with a dark background and deactivate editor's theme styles
Experiment with light text
Experiment with dark text
Screenshots, screen recording, code snippet
What actually happened
In-editor contrast warnings are incredibly misleading as they appear to use the editor's styles as the point of reference, rather than the actual site's background.
In-editor contrast warning, despite text being legible on front-end
No in-editor contrast warning, leading to illegible text (partially highlighted with cursor for the sake of the screenshot)
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: