0

As of WP 5.8.1 (or 5.8.0) the Gutenberg Editor gets to be default even for Widgets.

So I've started to create some Widgets with Gutenberg blocks. My issue is that if I add custom CSS to the blocks (through the block editor's custom css tab, wrapped in the selector {...} statement), it gets stripped out when the page is rendered.

enter image description here

Question: is this

  • a bug
  • an intended behaviour
  • or am I doing something wrong ?
4
  • How are you adding CSS to the blocks? Sep 29, 2021 at 4:00
  • @JacobPeattie through the block editor options -> custom css tab and with the selector {...} wrapper. See my edit in the question.
    – 1NN
    Sep 29, 2021 at 12:08
  • That is not a standard WordPress feature. Is that from a plugin? Or perhaps it's a feature of specific blocks your using? Either way, you would need to ask the author of that feature. Sep 29, 2021 at 15:23
  • @JacobPeattie Hmmm... I wasn't aware of that, but it looks like the theme I'm using incorporates the Blocks CSS Editor Plugin ... This resolves my question (but not my problem). - I'd accept that as an answer if you want to wirte it, otherwise I'll just delete the question and rethink everything. Thank you.
    – 1NN
    Sep 29, 2021 at 20:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.