-
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
Allow title and button-based appender to inherit styles. #21749
Conversation
Size Change: -22 B (0%) Total Size: 842 kB
ℹ️ View Unchanged
|
So, I tried to test:
Nothing happens. It is b/c of the theme? |
Thank you for looking! And sorry for not including better steps to test. TwentyTwenty is not loading editor styles correctly, so it will not make a difference there.
If all looks correct, this should be good to go :) |
Fixes #21724. |
8d0fbf2
to
1f373fd
Compare
I'm getting a bunch of failed e2e tests on this one, which seem completely unrelated to the fact that this is just CSS. Any insights? |
1f373fd
to
74ded9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on design review. Simple change so works for me.
File under "should've probably done this sooner", this PR allows the title field and the initial appender to inherit the theme styles defined by an editor style. In the past this wasn't possible due to how things were structured. But as it is, those styles are inherited by what is applied to the `editor-styles-wrapper`, which means this works both for themes that don't register and editor style — it looks like before — but now it also works for themes that do.
74ded9d
to
c1e7e55
Compare
Thanks for the approval. I've tested this well and it's a trivial code change so I'm going to go ahead and merge. |
File under "should've probably done this sooner", this PR allows the title field and the initial appender to inherit the theme styles defined by an editor style.
In the past this wasn't possible due to how things were structured. But as it is, those styles are inherited by what is applied to the
editor-styles-wrapper
, which means this works both for themes that don't register and editor style — it looks like before — but now it also works for themes that do.Before, vanilla style:
After, vanilla style:
After, with the following CSS registered as an editor style:
Because the title is not inside an
h1
element, we can't yet inherit font sizes and weights there. But this will be fixed once the title element becomes an actual block.