-
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
Navigation: color consistence between front-end and editor-canvas #20017
Comments
I took a look today and it appears to be a specificity fight between themes, editor styles, and colors. Here's TwentyTwentyOne: Note how the text color doesn't work in the editor. But it works on the frontend: This is the offending rule: TwentyTwentyOne outputs this CSS in its editor style:
That has way higher specificity than what the navigation color system outputs:
Because of this added specificity, the editor style will always win this fight. We could change the global styles to output this instead:
that would win the fight. However to me it feels like TwentyTwentyOne is doing it wrong, and is adding too high specificity. Since this was reported for TwentyTwenty as well, that either means two themes are doing it wrong, OR that what both themes are trying to accomplish is not well handled by the editor here. I'm tempted to say both themes are doing it wrong, because it works on the frontend but not in the editor. But that could still point to a complexity in the editor markup that led to the extra specificity being added to the editor style in the first place. @kjellr do you have any thoughts here? |
A good friend did some investigative work and uncovered that navigation |
I think it won't be a big deal but I need to dive into the code since I've been away from a loooong time ago. Going to take a look in a few days if it's still useful. :-D |
Oh, didn't mean for you to necessarily fix it, just wanted a quick gut check! I'll see if I can find some help. |
While still not 100% consistent, this appears to be less of an issue now: Do you have any thoughts on what to do here next @jasmussen? |
Oh nice, looks like #44578 also fixes this one. |
Cool! I will add this to my list to review and close if it is no longer relevant after #44578 is merged. Thank you @jasmussen |
Be consistent with text color in the front-end and the editor-canvas.
Twenty-twenty
front-end
editor-canvas
The text was updated successfully, but these errors were encountered: