# Soil 4.0.4s clean_html5_markup task breaks Critical CSS

**URL:** https://discourse.roots.io/t/soil-4-0-4s-clean-html5-markup-task-breaks-critical-css/21175
**Category:** plugins
**Created:** 2021-07-23T19:19:57Z
**Posts:** 3

## Post 1 by @allan.crabtree — 2021-07-23T19:19:57Z

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 v **3**.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](https://github.com/roots/soil/blob/main/src/Modules/CleanUpModule.php#L271-L272))

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

Any help really appreciated :slight_smile:

---

## Post 2 by @ben — 2021-07-23T21:22:43Z

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!

---

## Post 3 by @allan.crabtree — 2021-07-26T17:00:36Z

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:

---

## Post 4 by @system — 2021-09-03T19:19:58Z

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