theKashey / used-styles

📝All the critical styles you've used to render a page.
MIT License
137 stars 9 forks source link

missing css #43

Closed shangcloud closed 1 year ago

shangcloud commented 1 year ago

we use this library in our project, but find missing some style, the css selector is like this:

.downloads-1u5ev.downloadsFallback-1btP7 .logo-2Dv5-,.downloads-1u5ev.downloadsV5-3wG0y .logo-2Dv5- {
    margin-left: .08rem;
    position: relative;
    width: .5rem;
    height: .5rem
}
<div class="downloads-1u5ev downloadsV5-3wG0y"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" class="logo-2Dv5-" role="img" fill="#fb7701" stroke="none" stroke-width="18.962962962962962" preserveAspectRatio="none"></svg></div>

could you fix this problem?

theKashey commented 1 year ago

Thank you for the issue. It was a false-negative regression introduced during critical CSS reduction. Basically, classes nested on "double parents" were not supported at all, and there was no test ensuring the correct behavior.

Give a shot to used-styles@2.4.2