We are currently working on SEO technical improvements and one of the main warnings we received from SEMrush (SEO tool) is that there's a header module of our template theme that's affecting almost every page and that is causing delays in the website.
I know Hubspot automatically minifies everything but I don't know why it's not applying it to this one.
I was able to find the module in the design managers and tried creating a child theme to duplicate that module and minify the module.css code but I am afraid that when publishing the changes on my site my crush or all the style of the website would be modified.
What's the best way to minify that specific module without impacting anything else on my website?
I guess HubSpot won't minify css file if there are some syntax errors in it but at first glance everything seems to be fine. What you could try to do is to copy the module into your child theme (you already did that) and then create a separate CSS file and copy&paste the css code from the module.css. After that you can link the CSS file in your module like so: {{ require_css(get_asset_url('FILE_PATH')) }}
Thanks a lot for your quick response and help. Couldn't quiet get what you are suggesting.
What do you mean by "create a separate CSS file"? If I already created a child module, shouldn't I just paste the new minified code and paste the new module.css so it overwrites the ones on the parents module? I thought this could be the solution but my fear is that the website will crush or that the styles will not look as my website and instead as the original theme template.
What's the CSS file you are suggesting I link with {{ require_css(get_asset_url('FILE_PATH')) }}. ? That file path should be the new module.css created in the child theme?
Sorry for not following-up so easily but I'm not a developer hehe.