CSS – oik-css/css

Inline CSS

Use the CSS block to write inline CSS to style the content on the page.

Screenshot

Example

Set heading level 2 to green.h2 { color: green !important; }
p { color: green; }

Notes

Observations

  • Some CSS styling may not take effect in the block editor.
  • This is due to CSS delivered by the editor which overrides the styling from the block.
  • It’s most obvious when styling the headings.
  • You need to target your CSS with enough precision to only affect the areas you wanted to change.
  • Many blocks provide settings that negate the need for the CSS block.