Skip to content

Commit

Permalink
Update widget DOM optimization (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiy authored Dec 21, 2024
1 parent 6bf1933 commit 0cf754d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/widgets/widget-inner-wrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,10 @@ This widget can't use the optimized DOM capability as it uses the inner `.elemen
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.

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.

In the example code above, simply remove the `.elementor-widget-container` class from the selector:

```diff
- '{{WRAPPER}} > .elementor-widget-container h3' => 'color: {{VALUE}};',
+ '{{WRAPPER}} h3' => 'color: {{VALUE}};',
```

0 comments on commit 0cf754d

Please sign in to comment.