Repository navigation
Extensions Svg Patterns
Adds a library of 31 repeatable SVG background patterns to supported blocks. Patterns are rendered as CSS background-image data URIs — no JavaScript, no extra HTTP requests on the frontend.
A dsgoSvgPatternEnabled toggle and supporting attributes are added to core/group and designsetgo/section. When a pattern is selected, the block's saved markup includes data-dsgo-svg-pattern and related data attributes. A render_block filter (SVG_Pattern_Renderer) reads those attributes server-side, builds the SVG markup, URL-encodes it, and injects the result as --dsgo-svg-pattern-image and --dsgo-svg-pattern-size CSS custom properties on the block's root element. The editor canvas applies the same pattern inline via JavaScript so the result is visible while editing.
CSS preset colors (var(--wp--preset--color--{slug})) are resolved to their actual hex values before encoding, since SVG data URIs are external documents that cannot inherit page CSS custom properties.
core/groupdesignsetgo/section
Select a supported block, then open the SVG Pattern panel in the block sidebar.
- Enable SVG pattern — toggle the pattern overlay on or off.
- Pattern picker — thumbnail grid grouped by category. Click a thumbnail to select it; click Clear to remove the selection.
- Pattern Color — colour picker in the Styles → Color panel (appears when a pattern is active). Accepts theme palette colours, custom hex, or any CSS colour value.
- Pattern Opacity — 0.05 to 1.0, step 0.05.
- Pattern Scale — 0.25× to 4×, step 0.25. Controls the tile size relative to the pattern's natural dimensions.
-
Fixed Background — makes the pattern scroll at a different rate than the page content (CSS
background-attachment: fixed). May not work on mobile.
30 patterns across six categories:
| Category | Patterns (examples) |
|---|---|
| Minimal | Dot Grid, Cross Grid, Diagonal Lines, Horizontal Lines, Diagonal Stripes, Dashes, Polka Dots |
| Geometric | Hexagons, Diamond Grid, Chevrons, Flipped Diamonds, Triangle Grid, Falling Triangles, Glamorous, Architect, Hideout, Brick Wall |
| Organic | Topography, Waves, and others |
| Texture | Circuit Board, Graph Paper, and others |
| Depth | Multi-layer shadow patterns |
| Technical | Technical/blueprint-style patterns |
Pattern data is defined in src/extensions/svg-patterns/pattern-data.js (JS) and exposed to PHP via includes/data/svg-pattern-data.php through the designsetgo_get_svg_pattern_data() function.
No JavaScript runs on the frontend. The pattern appears as a tiled SVG background-image on the block's root element, layered on top of any existing background using CSS. The --dsgo-svg-pattern-image and --dsgo-svg-pattern-size custom properties are set as inline styles; the plugin stylesheet reads those properties to apply the pattern.
Identical pattern/color/opacity/scale combinations on the same page share a per-request SVG cache, so repeated blocks do not regenerate the same markup.
- The extension was present before 2.1.0. The PHP server-side renderer (
SVG_Pattern_Renderer) was added in 2.1.0 for improved performance and CSS preset colour resolution. - Pattern
dpath values are static; user input never reaches SVG attribute values. - Color input is validated against an allowlist of CSS colour formats before being embedded in SVG markup.
Auto-generated from
docs/extensions/SVG-PATTERNS.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Advanced Heading
- Blobs
- Breadcrumbs
- Card
- Chart
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Dynamic Image
- Fifty Fifty
- Flip Card
- Form Builder
- Grid
- Hotspot
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Trigger
- Pill
- Product Categories Grid
- Product Showcase Hero
- Progress Bar
- Query
- Query Filter
- Query Group Header
- Query No Results
- Query Pagination
- Query Results
- Row
- Scroll Accordion
- Scroll Marquee
- Scroll Slides
- Section
- Section Divider
- Slider
- Star Rating
- Sticky Sections
- Table Of Contents
- Tabs
- Text Path
- Timeline
- Background Video
- Block Animations
- Clickable Group
- Conditional Visibility
- Custom Css
- Draft Mode
- Dynamic Tags
- Expanding Background
- Grid Mobile Order
- Grid Span
- Hover Effects
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Style Binding
- Svg Patterns
- Text Alignment Inheritance
- Text Reveal
- Abilities Api
- Abilities Api Guide
- Block Bindings
- Draft Mode Api
- Form Webhooks
- Generation Contract
- Interactive Blocks
- Layout Flexibility
- Markdown Content Negotiation
- Rest Api Reference
- Wp Cli Reference
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Deploying To Wordpress Org
- Design System
- 2026 04 16 Blocks Editor Ux Design
- 2026 04 17 Theme 3 Inspector Ia
- 2026 04 21 Query Block Onboarding
- 2026 04 21 Query Capable Layout Blocks Design
- 2026 04 27 Block Roadmap Ideas
- 2026 07 01 Shape Divider Theme Inheritance
- 2026 07 02 Icon Block Dynamic Render Pilot
- 2026 07 06 Section Divider Block Design
- 2026 07 06 Section Style Variations Fse Design
- 2026 07 06 Section Styles Editor Preview
- 2026 07 07 Row Grid Overlay Hover Parity Design
- 2026 07 21 Conditional And Dup Label Sourcing
- 2026 07 23 Theme Block Type Animation Defaults
- 2026 08 16 Chart Block
- 2026 08 16 Greenshift Gap Roadmap
- 2026 08 17 Woocommerce Surface
- 2026 08 24 Loop Carousel
- 2026 08 24 Star Rating Block
- 2026 09 17 Abilities Drift Prevention
- 2026 09 17 Abilities Drift Prevention Implementation
- 2026 09 29 Existing User Regression Fixes
- 2026 09 29 Release Preflight Fixes
- Readme
- 2026 07 02 Block Authorability Audit
- 2026 09 29 Regression Fixes
- 2026 09 29 Release 2.9.0
- 2026 09 29 Release Fixes
- 2026 10 19 Bug Hunt
- 2026 10 20 Bug Hunt Round 2