| name | Divi 5 Compatibility |
| description | Use this skill when validating CSS for Divi 5 compatibility, checking for unsupported features, troubleshooting Divi CSS issues, or when the user mentions CSS not working in Divi. Provides compatibility rules, validation patterns, and fixes for common issues. |
| version | 1.0.0 |
Divi 5 Compatibility Reference
Quick Compatibility Check
When reviewing CSS for Divi 5, check for these issues:
CRITICAL: Not Supported
| Feature | Status | Fix |
|---|
ch unit | NOT SUPPORTED | Use rem (75ch -> 60rem) |
ex unit | NOT SUPPORTED | Use em or rem |
| Container Queries | NOT YET | Coming in future update |
@container | NOT YET | Use media queries |
Supported Features
| Feature | Status | Notes |
|---|
| CSS Variables | SUPPORTED | Must be in :root for global scope |
calc() | SUPPORTED | Full support |
clamp() | SUPPORTED | Full support |
min() | SUPPORTED | Full support |
max() | SUPPORTED | Full support |
| Flexbox | SUPPORTED | Native to Divi 5 layout |
| CSS Grid | SUPPORTED | Full support |
px | SUPPORTED | Standard unit |
em | SUPPORTED | Relative to parent font |
rem | SUPPORTED | Relative to root font |
% | SUPPORTED | Percentage |
vw | SUPPORTED | Viewport width |
vh | SUPPORTED | Viewport height |
vmin | SUPPORTED | Viewport minimum |
vmax | SUPPORTED | Viewport maximum |
Validation Rules
Rule 1: Character Units
max-width: 75ch;
width: 60ch;
max-width: 60rem;
width: 48rem;
Conversion formula: 1ch -> approx. 0.8rem (varies by font)
Rule 2: Button Specificity
.et_pb_button {
background-color: #000000;
}
body .et_pb_button {
background-color: #000000 !important;
}
Required for buttons:
body prefix for specificity
!important on all properties
Rule 3: CSS Variable Scope
.my-section {
--my-color: #2ea3f2;
}
.other-element {
color: var(--my-color);
}
:root {
--my-color: #2ea3f2;
}
.other-element {
color: var(--my-color);
}
Rule 4: Code Module Wrapping
.my-class { color: red; }
<style>
.my-class { color: red; }
</style>
Rule 5: Theme Options Format
:root {
--my-color: #2ea3f2;
}
body .et_pb_button {
background-color: var(--my-color) !important;
}
<!-- INVALID for Theme Options - has tags -->
<style>
:root { --my-color: #2ea3f2; }
</style>
Common Issues & Fixes
Issue: Button styles not applying
Symptom: Custom button colors/styles ignored
Cause: Low specificity, missing !important
Fix:
body .et_pb_button {
background-color: #000000 !important;
border-radius: 0 !important;
}
Issue: Text too wide on large screens
Symptom: Text stretches across entire screen
Cause: Using ch unit or no max-width
Fix:
.et_pb_text_inner p {
max-width: 60rem;
}
Issue: CSS Variables not working
Symptom: Variables undefined or not applying
Cause: Wrong scope or wrong syntax
Fix:
:root {
--my-color: #2ea3f2;
}
.element {
color: var(--my-color);
}
Issue: Hover states not working
Symptom: Hover effects ignored
Cause: Divi's inline styles override
Fix:
body .et_pb_button:hover {
background-color: #222222 !important;
}
Issue: Font not loading
Symptom: Fallback font displays instead
Cause: Font not loaded or wrong name
Fix:
font-family: 'Fira Sans', system-ui, sans-serif !important;
Issue: Section background wrong
Symptom: Background color different than expected
Cause: Divi's inline styles
Fix:
.et_pb_section.my-dark-section {
background-color: #1d1f22 !important;
}
Issue: Flexbox layout breaking
Symptom: Layout doesn't match design
Cause: Divi 5 uses Flexbox by default, conflicts with custom
Fix: Work with Divi's Flexbox, don't fight it
.et_pb_row {
display: flex !important;
flex-direction: row !important;
gap: 2rem !important;
}
Validation Checklist
When reviewing CSS for Divi 5, verify:
Error Messages Reference
"Property ignored"
Usually means low specificity. Add !important.
"Unknown property"
Check for typos or unsupported properties.
"Unknown unit"
Using ch or ex. Replace with rem or em.
"Unexpected token"
Syntax error. Check for missing semicolons, braces, or quotes.
Styles not applying at all
Check:
- Is CSS in correct location? (Theme Options vs Code Module)
- Are style tags correct? (needed for Code Module, NOT for Theme Options)
- Is selector correct? Check in browser DevTools
Divi-Specific CSS Debugging
Using Browser DevTools
- Right-click element -> Inspect
- Look at Styles panel
- Check for:
- Crossed-out styles (being overridden)
- Grayed-out styles (invalid)
- Inline styles (Divi's defaults)
Common Override Pattern
style="background-color: blue !important;"
body .et_pb_section#my-id {
background-color: red !important;
}
Compatibility Mode Reference
Advisory Mode (Default)
- Reports issues as warnings
- Suggests fixes
- Allows proceeding with warnings
Strict Mode
- Reports issues as errors
- Requires fixes before proceeding
- Blocks incompatible CSS
Configure in .claude/divi5-toolkit.local.md:
---
validation_mode: advisory
---
Resources
When issues aren't resolved:
- Check Elegant Themes documentation: https://help.elegantthemes.com
- Research on Context7 for latest Divi 5 updates
- Use
/divi5-toolkit:research command for current info
- Consult Codex or ChatGPT for complex CSS questions