WordPress plugin intelligence profile

Pattern CSS – The CSS Editor For Blocks

Add a CSS editor to your blocks and patterns! Loads only where necessary. Supports adding global CSS too.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version1.5.7
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.7 · PHP 7.0
Directory statusactive
Last directory update15 Aug 20262mo ago
Active installations100Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 8 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Pattern CSS – The CSS Editor For Blocks version 1.5.7 as active, updated 2mo ago and tested up to WordPress 7.1.

Overview

About this plugin

The missing inline block CSS editor for the Gutenberg editor. Very powerful with synced patterns as well. And it pairs well with global styles.

This plugin is perfect for users looking to add CSS for blocks without needing to create a child theme, or use a bloated plugin. Client safe too. CSS won’t leak outside of the block, and only valid block CSS is persisted.

Star it on GitHub

Follow me on Twitter @kevinbatdorf

How to

  • Every block will have a new “Pattern CSS” settings panel
  • Open it and add any CSS. It will be scoped to the block
  • To target the block directly, you must use the [block] selector
  • To target any element inside the block, use the normal CSS selector
  • Use!important to override your theme styles (use sparingly)

Global Editor

  • Access global styles under the options menu (three dots) in the top right corner of the editor
  • Additionaly, you can open from the Pattern CSS block editor controls

Features

  • Powered by WebAssembly for fast and secure CSS parsing
  • Smart loading. Only loads the CSS when the block is present
  • Styles persist when changing themes
  • Scopes styles to the block so that parent/sibling blocks are not affected
  • It’s fast
  • CSS is minified and optimized
  • It’s safe. Invalid, non-spec CSS is never persisted
  • Supports reusable (synced or not-synced) patterns
  • See changes on the page as you make them
  • Combines adjacent rules (to decrease size)
  • Minifies colors and math functions to simplify according to spec
  • Supports CSS nesting

Basic Example

important; } a:hover { text-decoration-color: darkgoldenrod; }

pcss-a1b7b016 a:hover{text-decoration-color:#b8860b}

Supports Media Queries

@media (prefers-color-scheme: dark) { [block] { border-color: blue; } }

pcss-cddaa023{border-color:#00f}}

Combines Rules

bar { color: red; }

bar{color:red}

Fixes redundant properties

[block] { padding-top: 5px; padding-left: 50px; padding-bottom: 15px; padding-right: 5px; }

pcss-3aa0f0fc{padding:5px 5px 15px 50px}

Supports CSS nesting

[block] { padding: 1rem; a { color: red; } background: white; /* Including media queries */ @media (prefers-color-scheme: dark) { background: black; color:white; } }

pcss-f526bb2d{background:#fff;padding:1rem;& a{color:red}@media (prefers-color-scheme:dark){&{color:#fff;background:#000}}}

Check browser support for CSS nesting

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • block
  • css
  • editor
  • inline
  • styles
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.7 · PHP 7.0
Update activity15 Aug 20262mo ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.