Quick Answer
Match a generated CSS snippet to the Divi field receiving it. Divi 5’s Free-Form CSS accepts complete blocks using the selector keyword for the current element. Its Module Elements fields accept declarations for their specific target. Similar-looking code boxes do not necessarily accept the same format.
A request to change one heading can produce valid CSS in the wrong form for the selected field. Inspect the receiving field and target before trying another prompt.
Separate the launch from the current field contract
The original Divi Code AI announcement introduced generated code and free-form CSS. Its launch offer, future-feature language and demonstration outcomes are historical, not current entitlements or results from our work.
Elegant Themes’ current Divi 5 CSS option-group guide distinguishes Free-Form CSS from Module Elements. Confirm the installed version and actual field before applying that distinction.
Compare the two formats
The following examples are illustrative code formats, not a tested patch for a website.
In Free-Form CSS, a complete block could look like this, assuming the selected module actually contains the intended h4:
selector h4 {
letter-spacing: 0.02em;
}
In the appropriate Module Elements field for the intended element, the declaration would instead have this form:
letter-spacing: 0.02em;
The second field supplies its own target. Do not add a selector and braces merely because they were present in the generated answer. Conversely, a declaration by itself does not identify a selector when placed in a field that expects full blocks.
These examples are not automatically equivalent targets. Verify which actual element the Module Elements field addresses and which heading exists in the module markup.
Give the code reviewer three concrete facts
| Fact | What to establish |
|---|---|
| Receiving field | The exact element, tab and CSS field, including its expected syntax. |
| Intended target | The actual heading or other element the approved change should affect. |
| Expected behavior | The specific visual adjustment and the relevant responsive or interaction states to check. |
Provide those facts to a writing tool if it is used to suggest code. Keep the suggestion separate from approval, and review every property rather than accepting unrelated additions.
Verify the built result
Work within the project’s approved development process and preserve the previous field value. Inspect the resulting styles and the actual element, then compare another module that should remain unaffected. Check the relevant screen widths and long content.
The custom CSS location guide covers the broader choice of maintained theme and site-level locations. This article concerns the syntax contract of two Divi fields. If the change affects a form, the feedback-state worksheet provides a separate behavior specification. No generated snippet establishes that those interactions have been tested.
Key Takeaways
- Identify the field before accepting generated CSS.
- Distinguish complete selector blocks from declarations.
- Verify the actual target and built result in development.
Frequently Asked Questions
Can the same snippet be pasted into every CSS box?
No. Check the field’s target and expected syntax. Divi’s documented fields have different formats.
Is the selector keyword a universal replacement in every stylesheet?
This guide describes Divi’s scoped Free-Form field. Follow the actual field or stylesheet’s requirements instead of transferring that token blindly.

