Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the size of hello-elementor-theme-style-css by splitting the CSS and only loading the relevant parts #313

Open
Nazrinn opened this issue Aug 3, 2023 · 1 comment

Comments

@Nazrinn
Copy link

Nazrinn commented Aug 3, 2023

Hey there,

So, something I noticed a lot with my Elementor websites and using Hello Theme is that only a small part of the hello-elementor-theme-style-css file code is used on each page.

Here is an example:
image

As you can see, only around 5% of the file's code is used.

This extra code seems to impact Google Lighthouse metrics in a signaficant way, and I can't seem to be able to get rid of it.

Would there be a way for hello-elementor-theme-style-css to be composed only of the styles that are used within the page/theme? Not every page has a dialog box or uses swiper code for instance (in fact, this is pretty much most of my pages).

Thanks!

@rami-elementor
Copy link
Member

Hi @Nazrinn

While trying to optimize the theme, we came to a similar conclusion.

In Hello theme version 3.0.0 we plan to split the theme.css file, removing unused CSS. Moving some styles to a separate file which will load only if the functionality is active.

This change should reduce the file size by 60% - 85%, depends on different factors.

Ref: #341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants