Roots Discourse

Soil 4.0.4s clean_html5_markup task breaks Critical CSS

Hey everyone,

Short version: :fast_forward:
How to stop the removal of ‘ID’ and ‘Type’ attributes on a element inside ‘clean_html5_markup’ Soil task because it breaks the Webpack Critical CSS functionality.

Longer version :zzz: (It’s not that long tbh… :slight_smile: )
In Soil’s 4.0.4 “clean-up” module there is a task called “clean_html5_markup” which is breaking my Webpack’s Critical CSS functionality (This functionality is based on the existing guides)

Amongst the existing Critical/Async CSS posts/threads and guides, there’s a few other posts/comments confirming that others have encountered this issue as well, but the solutions only work with Soil v3.X and I’m using 4.0.4

To summarise, the Critical CSS generation fails because of the following two lines inside the Soil plugin which removes the ID and Type attributes inside the style_loader_tag filter. (Link)

How can we stop the function/filter from running which removes the attributes.

Any help really appreciated :slight_smile:

Hey Allan! Have you purchased a Soil license? I looked up your email and didn’t find a record of a Soil license, so please let us know if you used a different email address!

Hey Ben,

Well I guess that my OP falls under a support request, and as you’ve correctly discovered I don’t have a license, so I guess that = no support for me :slight_smile: :coffin: haha, completely understandable. Will try and figure it out the hard way by brute force :slight_smile:

This topic was automatically closed after 42 days. New replies are no longer allowed.