No slash command · from divi5-toolkit
Validates CSS for Divi 5 compatibility, checks unsupported features, troubleshoots plugin conflicts, and provides migration guidance from Divi 4 to Divi 5.
Ships in divi5-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Divi 5 Version: 5.13.1 (September 18, 2026 — Divi 5.0 released February 26, 2026; weekly release cadence)
Architecture: React 18, no Shadow DOM, standard DOM with et_pb_* classes
Key recent additions:
:checked, :focus, :active), Contact Form 7 Styler, Nested Option PresetsalignItems CSS classes on Column/Section/Row/Group| Unit | Status | Notes |
|---|---|---|
px | Supported | Standard absolute unit |
% | Supported | Percentage |
em | Supported | Relative to parent font |
rem | Supported | Relative to root font |
vw | Supported | Viewport width |
vh | Supported | Viewport height |
in, mm, cm, pt, pc | Supported | Print/absolute units |
All valid CSS units work in advanced input mode and in custom CSS fields:
| Unit | Status | Notes |
|---|---|---|
ch | Works in custom CSS | Not in dropdown; works in freeform/advanced/child theme |
ex | Works in custom CSS | Not in dropdown; works in freeform/advanced/child theme |
dvh, svh, lvh | Works in custom CSS | Dynamic/small/large viewport units |
vmin, vmax | Works in custom CSS | Viewport min/max |
Key insight: Since Divi 5 renders standard HTML without Shadow DOM, any CSS feature the browser supports will work in custom CSS, Code Modules, Free-Form CSS, or child theme stylesheets. The unit picker dropdown is limited, but custom CSS is not.
| Function | Status | Notes |
|---|---|---|
calc() | Fully supported | Works in builder fields and custom CSS |
clamp() | Fully supported | Great for fluid responsive values |
min() | Fully supported | Works in builder fields |
max() | Fully supported | Works in builder fields |
var() | Fully supported | CSS custom properties |
| Feature | Status | Notes |
|---|---|---|
| CSS Variables | Supported | Must be in :root for global scope |
| Flexbox | Native | First-class builder support |
| CSS Grid | Native | Convertible from flexbox in builder |
Container queries (@container) | Works | Via custom CSS/child theme (not in builder UI) |
:has() selector | Works | Via custom CSS/child theme |
| CSS nesting | Works | Browser-native feature, via custom CSS |
Cascade layers (@layer) | Works | Via custom CSS/child theme |
@media queries | Works | Standard responsive tool |
auto, none, unset, inherit, fit-content — all supported in advanced unit fields.
/* WILL NOT WORK — Divi overrides this */
.et_pb_button {
background-color: #000000;
}
/* WILL WORK — proper override */
body .et_pb_button {
background-color: #000000 !important;
}
Required for buttons:
body prefix for specificity!important on all properties/* May not work globally — wrong scope */
.my-section {
--my-color: #2ea3f2;
}
/* WILL WORK — :root scope */
:root {
--my-color: #2ea3f2;
}
<!-- INVALID — raw CSS in Code Module -->
.my-class { color: red; }
<!-- VALID — wrapped in style tags -->
<style>
.my-class { color: red; }
</style>
Theme Options Custom CSS must NOT have <style> tags.
The Module Element CSS fields (Title, Body, Button, Main Element, Before, After) accept property declarations only — no selectors or braces. Use Free-Form CSS for full rulesets.
/* Module Element field (properties only): */
color: red;
font-size: 1.2rem;
/* Free-Form CSS (full rulesets with selector keyword): */
selector h4 { color: red; line-height: 1.5; }
selector:hover { transform: scale(1.02); }
/* FRAGILE — changes when modules are reordered */
.et_pb_text_0 { color: red; }
/* STABLE — use custom classes instead */
.my-intro-text { color: red; }
Divi 5 ships with 7 breakpoints, but only 3 are active by default:
| Breakpoint | Default Width | Active by Default | Query Type |
|---|---|---|---|
| Phone | 767px | Yes | max-width |
| Phone Wide | 860px | No (enable in builder) | max-width |
| Tablet | 980px | Yes | max-width |
| Tablet Wide | 1024px | No (enable in builder) | max-width |
| Desktop | (base) | Yes (cannot be disabled) | N/A |
| Widescreen | 1280px | No (enable in builder) | min-width |
| Ultra Wide | 2560px | No (enable in builder) | min-width |
All breakpoint widths are customizable. Custom breakpoints configured via Sitewide Responsive Breakpoints modal in the Visual Builder.
/* Phone (default active) */
@media (max-width: 767px) { }
/* Tablet (default active) */
@media (max-width: 980px) { }
/* Widescreen (must enable) */
@media (min-width: 1280px) { }
/* Ultra Wide (must enable) */
@media (min-width: 2560px) { }
Note: The visibility toggle only supports the original 3 breakpoints (desktop, tablet, phone). Use CSS for visibility on custom breakpoints.
Symptom: Custom button colors/styles ignored Cause: Low specificity, missing !important Fix:
body .et_pb_button {
background-color: #000000 !important;
border-radius: 0 !important;
/* ALL properties need !important */
}
Symptom: Styles appear struck-through in DevTools
Cause: Divi's cached-inline-styles CSS loads after child theme stylesheets
Fix: Move CSS to Theme Options Custom CSS panel (loads later in cascade), increase selector specificity, or use !important.
Symptom: Variables undefined or not applying Cause: Wrong scope or Divi 5.1 unit picker bug (fixed) Fix:
:root {
--my-color: #2ea3f2;
}
.element {
color: var(--my-color);
}
Symptom: Styles look different in builder vs live site Cause: Builder renders in an iframe with different CSS context Fix: Always test on the frontend. Use Safe Mode (Divi > Support Center) to isolate.
Symptom: Custom CSS disappears or breaks after updating Cause: Static CSS cache is stale Fix: Clear at Divi > Theme Options > Builder > Advanced > Static CSS File Generation > Clear. Disable Static CSS during active development.
Symptom: Fallback font displays instead Cause: Websafe fonts incorrectly generating Google Fonts API requests (fixed in 5.1) Fix: Ensure font is loaded via Google Fonts or @font-face. Use exact name with fallbacks:
font-family: 'Fira Sans', system-ui, sans-serif !important;
Symptom: Elements stack or overflow incorrectly Cause: Divi 5 uses Flexbox by default; custom CSS may conflict Fix: Work with Divi's Flexbox controls in the builder, or override completely:
.et_pb_row {
display: flex !important;
flex-direction: row !important;
gap: 2rem !important;
}
Symptom: Hover effects ignored Cause: Divi's inline styles override Fix:
body .et_pb_button:hover {
background-color: #222222 !important;
}
Symptom: You add my-card under Advanced > Attributes > class, but the frontend wrapper only carries the class from the module's Element/Attributes preset, so .et_pb_blurb.my-card matches nothing.
Cause: Before Divi 5.12 a CSS class defined in a preset overrode the local module class instead of merging with it. Separately, presets that defined interactions, main-wrapper attributes, or CSS classes did not emit them at all.
Fix: Update to Divi 5.12+ (both fixed). On older versions, move the class from the preset to the module (or vice versa) so only one source sets it, then clear Static CSS.
Symptom: After a Divi 4 → 5 migration, a module's Free-Form CSS (using selector) renders correctly inside the Visual Builder but is absent from the frontend stylesheet.
Cause: Migrated free-form custom CSS was not emitted on the frontend. Fixed in Divi 5.13 so the frontend matches the builder.
Fix: Update to Divi 5.13+ and clear Static CSS. If you can't update, copy the rule into Theme Options Custom CSS with an explicit class selector as a temporary bridge, then remove it after updating.
Symptom: A background set on the Theme Builder header or footer content area also paints behind native page content. Cause: Content-area backgrounds in TB header/footer layouts leaked into the page body. Fixed in 5.13. Fix: Update to 5.13+. Workaround on older versions: move the background from the layout's content area to the section inside the header/footer template.
Symptom: A previously centered header menu (e.g., inline_centered_logo style) packs to the left on every page immediately after clearing the Static CSS cache. No custom CSS touches the menu.
Cause: Regeneration re-emits the template's flex layout CSS using current defaults (justify-content: start). Modules configured before Divi exposed explicit Flex options (or left at "default") inherited centering implicitly; the regenerated CSS doesn't reproduce it. Diagnostic signature: .et_pb_menu_inner_container computes justify-content: start and .et_pb_menu__wrap computes flex: 0 1 auto while the stylesheet still contains flex: 1 1 auto for it.
Fix: In the Theme Builder, set the menu module's Justify Content and Align Items explicitly — per breakpoint (e.g., Desktop: Center; Tablet/Phone: Space Between so the logo stays left and the hamburger stays right). Any setting change + Save forces a clean regeneration. Do NOT patch with custom CSS first — the builder-native fix survives future regenerations.
et_pb_section_N_tb_header / _tb_footer silently stops matching (field-verified 2026-06-12)Symptom: A rule scoped to a numbered Theme Builder template class (e.g., .et_pb_section_1_tb_footer) stops applying after editing/resaving any template — no error, the selector just matches nothing.
Cause: Resaving a Theme Builder template can renumber its et_pb_section_N_tb_* classes (e.g., _1_ → _3_). Numbered template classes are exactly as fragile as page-level numbered selectors (.et_pb_text_0), but they look stable because they survive page edits — they only break on template saves, which makes the failure hard to trace.
Fix: Scope to the stable Theme Builder layout wrappers instead: .et-l--header, .et-l--body, .et-l--footer (e.g., .et-l--footer a[href^="tel:"]). Treat et_pb_*_N_tb_* in custom CSS as a P0 finding, same as any numbered selector.
Symptom: Sections vanish after Publish/Update, a section/row was deleted by mistake, or a page comes back blank after migration. The builder's History panel is empty or the tab was already closed.
Where the data actually lives: Divi 5 stores the page layout in post_content as block markup (<!-- wp:divi/section {...} --> … <!-- /wp:divi/section -->). The Divi 5 Migrator rewrites Divi 4 shortcodes into this format in place ("the conversion occurs at the database level"). Postmeta holds only flags such as _et_pb_use_builder, not the layout. WordPress Revisions snapshot post_content, so any revision saved before the mistake contains the full layout — Elegant Themes' own Divi 5 recovery guide lists Revisions as the first method. Do not tell users Revisions can't recover Divi 5 content.
Exception: Theme Builder header/body/footer layouts are separate posts (et_header_layout, et_body_layout, et_footer_layout, grouped under an et_template). A page's revisions never contain template edits, and a template's revisions never contain page edits.
Fix (in order):
wp post list --post_type=revision --post_parent=<ID> --fields=ID,post_modified, then wp post get <REV_ID> --field=post_content | grep -c 'wp:divi/' (a count above 0 means the layout is in that revision). Via REST with edit-capable auth: /wp/v2/pages/<ID>/revisions?context=edit and compare content.raw. If no useful revision exists, check WP_POST_REVISIONS in wp-config.php — false or a low cap silently discards history.WP_POST_REVISIONS enabled, and set the builder's History State Interval to "after every action".admin-ajax.php in ModSecurity. (Pre-5.8 Divi caused LiteSpeed to purge entire entry sets on every edit — fixed in Divi 5.8.)[et_pb_section]) → JSON block formatComposable Settings let you enable any design option for any module sub-element directly in the builder. Before reaching for custom CSS, check if the styling can be achieved natively:
| CSS Pattern | Composable Alternative | Since |
|---|---|---|
| Width/height on buttons | Enable Sizing options on button sub-element | 5.2 |
| Border on titles | Enable Border options on title sub-element | 5.2 |
| Animation on images | Enable Animation options on image sub-element | 5.2 |
| Transform on any sub-element | Enable Transform options via Compose Settings | 5.2 |
| Spacing on any sub-element | Enable Spacing options via Compose Settings | 5.2 |
input:focus / input:checked / input:active styling | Use the pseudo-class tabs in field design | 5.3 |
aspect-ratio: 16/9 on images | Sizing > Aspect Ratio | 5.5 |
object-fit / object-position on cropped images | Framing settings | 5.5 |
| Image-specific options on non-image modules | Composable settings for image option groups | 5.5 |
| Nested presets (e.g., button border inside CTA preset) | Nested Option Presets | 5.3 |
Repeated linear-gradient() values across elements | Gradient Variables | 5.7 |
background-clip: text gradient/image text fills | Gradient + image text fill controls | 5.7 |
-webkit-text-stroke on headings | Text-stroke controls | 5.7 (expanded 5.9) |
::after-based tooltip CSS | Tooltip module | 5.8 |
font-variation-settings / variable font axes | Variable Fonts controls | 5.9 |
Drop caps (::first-letter), column-count, hyphens | New typography options | 5.9 |
grid-template-* / grid-column: span layouts | CSS Grid Editor (start/end/span offsets) | 5.9 |
| Custom JS loop filtering | Post Filter + Post Filter Item modules | 5.10 |
align-items overrides on rows/columns | Flexbox alignItems classes + builder setting | 5.11 |
backdrop-filter: blur() glass panels, filter: invert() / sepia() | Design > Filters (backdrop blur, invert, sepia controls) | 5.12 |
Hiding/showing Contact Form <label> elements with CSS | Contact Form > Show Labels toggle (+ Label Text styles now apply) | 5.13 |
| Custom slide counter / progress bar CSS on Sliders | Slider swipe-controls bar (formatted counts, segmented progress, swipe label) | 5.13 |
display / gap / flex unit tweaks via custom CSS | LayoutStyle emits the full unit set for display, gaps, and flex | 5.13 |
When CSS is still needed:
:has(), sibling combinators, attribute selectors)::before, ::after) beyond what Free-Form CSS offers@media queries for preference queries (prefers-reduced-motion, prefers-color-scheme)@keyframes animationsIf a user reports one of these symptoms, check whether their Divi version predates the fix.
calc() function values and CSS variable valuesfirst_in_row, last_in_row, on_last_row selectorsclamp())& in Free-Form CSS and CodeMirror CSS fieldsclass/style names now merge instead of dropping entriesdisplay, gap, and flex CSS emissionnode_modules URLs)If a user is on a Divi version older than the fix for their issue, the answer is "update Divi." For users who can't update (compatibility constraints, third-party module dependencies), provide a workaround appropriate to their version.
| Error | Cause | Fix |
|---|---|---|
| "Property ignored" | Low specificity | Add !important or increase specificity |
| "Unknown property" | Typo or unsupported | Check property name |
| "Expected RBRACE" | Missing } or selectors in Module Element field | Use Free-Form CSS for full rulesets |
| "Unexpected token" | Syntax error | Check semicolons, braces, quotes |
| Styles not applying | Wrong CSS location or cache | Check format (Code Module needs <style>, Theme Options does not). Clear cache. |
| Transform values corrupted | Dragging Scale handles corrupts calc()/var() values | Re-enter values manually (fixed in 5.2) |
| Box shadow hover broken | Empty string values overwrite presets | Update to 5.2, or set explicit hover shadow |
| Loop page CSS missing | Pagination cache conflict | Clear Static CSS; fixed in 5.2 |
| Linter errors on valid nested CSS | False positives on nested selectors without & in Free-Form CSS | Update to 5.8 — the CSS is valid, the linter was wrong |
| Styles intermittently disappearing | Cache bugs in Dynamic CSS pipeline | Update to 5.8/5.9 (multiple cache fixes); clear Static CSS |
| Custom class from Attributes panel missing on frontend | Preset class overrode local class (pre-5.12) | Update to 5.12; or set the class in only one place |
| Migrated Free-Form CSS works in builder, not frontend | Migrated free-form CSS not emitted (pre-5.13) | Update to 5.13; bridge via Theme Options CSS meanwhile |
| Preset custom ID missing on frontend | Preset ID attributes not emitted (pre-5.13) | Update to 5.13; or set the ID on the module directly |
Configure in .claude/divi5-toolkit.local.md:
validation_mode: advisory # or "strict"
For complete details, see:
${CLAUDE_PLUGIN_ROOT}/skills/divi5-compatibility/references/unit-conversions.md — CSS unit support, conversion tables, fluid responsive patterns${CLAUDE_PLUGIN_ROOT}/skills/divi5-performance/SKILL.md — Critical CSS, Dynamic CSS, Inline Stylesheets, cache plugin compatibility${CLAUDE_PLUGIN_ROOT}/skills/divi5-performance/references/core-web-vitals.md — LCP/INP/CLS diagnostics with Divi-specific causes and fixesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
divi-5, wordpress, css-compatibility, plugin-conflicts, migration
npx claudepluginhub cjsimon2/divi5-toolkit --plugin divi5-toolkit3 skills in this plugin
/divi5-css-patternsDivi 5 CSS PatternsUse this skill when writing CSS for Divi 5 / Divi 5.13, styling Divi modules (buttons, sections, rows, blurbs, toggles, forms including the 5.3 Contact Form 7 Styler and 5.11 Gravity Forms module), the newer modules (Timeline, Breadcrumbs, SVG, Table of Contents, Instagram Feed, Tooltip, Post Filter, Charts, Payment Button, Imagely Gallery), working with Free-Form CSS and the `selector` keyword, overriding `.et_pb_*` classes, setting up design tokens or dark mode, using the 5.4 Sizing Variable Generator or Relative Colorscheme Generator, the 5.7 Gradient Variables and text effects (text-stroke, gradient/image text fills), the 5.9 Variable Fonts and CSS Grid Editor, the 5.12 backdrop-blur / invert / sepia Filters, the 5.13 Contact Form Show Labels and Slider swipe controls, applying the 5.5 Aspect Ratio / Framing settings, adding animations with reduced-motion, styling WooCommerce with Divi, the 5.3 pseudo-class editing modes (:checked, :focus, :active), Nested Option Presets, building accessible layouts, or developing a Divi child theme. Provides CSS patterns, class naming conventions, selector specificity guidance, Composable Settings alternatives, Canvas and Loop Builder patterns (including 5.10 front-end Loop Filters), and full example files for buttons, design tokens, animations, dark mode, WooCommerce, accessibility, forms, Loop Builder, and the 5.6–5.11 new modules./divi5-performanceDivi 5 PerformanceUse this skill when optimizing Divi 5 site performance, improving Core Web Vitals (LCP, INP, CLS), reducing render-blocking CSS, working with Divi's Critical CSS / Dynamic CSS / Inline Stylesheet system, configuring font loading (WOFF2, preload, font-display, variable fonts from 5.9), lazy-loading background images, preloading above-the-fold images, debugging slow Divi pages, or auditing cache-plugin interactions (WP Rocket RUCSS, LiteSpeed, Autoptimize, Perfmatters). Covers Divi 5's per-page component CSS, the 5.5 Aspect Ratio for CLS prevention, the 5.10 native below-the-fold lazy loading and deferred local videos, and the per-module helper class pattern for lazy-loading.Other plugins' skills for the same job