You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Categories block doesn't inherit css from style.css on the Editor #43999
Hi!
Defining a custom style for the categories core block doesn't affect that style on the editor.
The style works, on the other hand, on the page list block (pretty similar to the categories one).
Step-by-step reproduction instructions
Add a categories list block and a page list block.
Add the following code on your styles.css
both are working on the frontend, while only the page list block is getting the correct style.
This looks a problem on the Editor's class names:
block-editor-block-list__block wp-block wp-block-page-list on the block pages list.
wp-block-categories__list wp-block-categories__list-level-0 on the categories list block.
the second one should probably be:
block-editor-block-list__block wp-block wp-block-categories-list
Hi!
Style.css in themes is not added to the editor by default. The theme needs to use an editor style. I mention this because it is not clear from the issue description, how the style.css is added. Sorry if this is obvious.
@SGr33n
Thank you for submitting the Issue.
Issue #43666 was not merged at the time you commented, so it was not reflected in the latest trunk.
I have just merged it and would like to close this issue.
If you pull the latest trunk, you should see that this issue has been resolved.
If the issue has not been resolved, please do not worry about it and reopen.
Activity
carolinan commentedon Sep 9, 2022
Hi!
Style.css in themes is not added to the editor by default. The theme needs to use an editor style. I mention this because it is not clear from the issue description, how the style.css is added. Sorry if this is obvious.
SGr33n commentedon Sep 9, 2022
It's on twentytwenty-two, on the theme main stylesheet, it's correctly added to the Gutenberg editor:
Frontend:
Gutenberg:
carolinan commentedon Sep 9, 2022
Are you able to test if your CSS works with this PR? #43666
SGr33n commentedon Sep 9, 2022
Sorry i forgot to mention that this test was made on the latest Gutenberg trunk, so this PR should already be in.
t-hamano commentedon Sep 10, 2022
@SGr33n
Thank you for submitting the Issue.
Issue #43666 was not merged at the time you commented, so it was not reflected in the latest
trunk.I have just merged it and would like to close this issue.
If you pull the latest
trunk, you should see that this issue has been resolved.If the issue has not been resolved, please do not worry about it and reopen.
SGr33n commentedon Sep 10, 2022
Thanks @t-hamano and @carolinan!
SGr33n commentedon Sep 10, 2022
I can confirm, #43666 solved this.
Thanks!