Don't load drop-cap css unless drop caps are actually being used on a page. #22339
joehdevwp
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
What problem is your feature request going to solve? Please describe.
From a recent Elementor support ticket I received this response:
"When you have the Improved CSS Loading experiment active, Elementor will add widget-specific CSS to every first instance of the widget on pages only once, instead of including basic styles for all widgets on a single big CSS file elementor-frontent.css. Meaning it will only load the CSS that is required for that page, and that widget, only once. If you don't use that widget elsewhere, it won't load the basic CSS for that widget. This means that your pages will load lighter and perform better depending on the page you are on. The basic CSS for the Text Editor includes styles for the widget's Drop-cap feature."
Note the phrase, "it will only load the CSS that is required for that page" This is false. The CSS Loading experiment loads the following css on each and every page with a text editor widget regardless of whether or not drop caps are being used:
I understand the intention is to optimize the page speed, but to load css for a feature is that so rarely used seems completely contradictory.
Describe the solution you'd like
Only load the inline drop-cap css when dropcaps are actually being used on the page. Elementor is already bloated enough without loading css that isn't being used at all.
Describe alternatives you've considered
No response
Additional context
I realize this is a small issue, and perhaps makes very little impact on page speed, but little impacts add up, and Elementor is already known for using excessive dom elements and bloated code compared to its competitors. If this CSS were for a feature that was commonly used perhaps it would be acceptable.
Beta Was this translation helpful? Give feedback.
All reactions