Skip to content

Commit 0cf754d

Browse files
authored
Update widget DOM optimization (#300)
1 parent 6bf1933 commit 0cf754d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/widgets/widget-inner-wrapper.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,10 @@ This widget can't use the optimized DOM capability as it uses the inner `.elemen
9292
Please note that retaining unoptimized DOM is a temporary solution that allows addon developers to maintain compatibility while updating their code. The ultimate goal is to transition all widgets to use the optimized single-wrapper structure.
9393

9494
Optimized DOM for widget wrappers is not only setting `has_widget_inner_wrapper()` to `false`, it requires removal of `.elementor-widget-container` from all files, including PHP, CSS and JS.
95+
96+
In the example code above, simply remove the `.elementor-widget-container` class from the selector:
97+
98+
```diff
99+
- '{{WRAPPER}} > .elementor-widget-container h3' => 'color: {{VALUE}};',
100+
+ '{{WRAPPER}} h3' => 'color: {{VALUE}};',
101+
```

0 commit comments

Comments
 (0)