Classnames separated by dots are removed
See original GitHub issueIf I have a selector in my css .my-class.something-else
, it is getting removed even though my I have this in my settings whitelistPatterns: [/^my-/]
. There are many variants of that like .my-class.another-thing
, so how can I be sure to keep them all? Shouldn’t my whitelist pattern already work for this?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Can you use a dot in a class name? Cos the buttons aren't ...
Short answer: no. You'll want to remove those dots or replace them with something else. Longer answer... A dot within a CSS selector...
Read more >Is it possible to use the space character in CSS class names?
There is no way to escape the space character in the class attribute value and hence will always be interpreted as two different...
Read more >Reducing CSS bundle size 70% by cutting the class names ...
There is a good reason I have added _ into the CSS class name separating the component name and the local identifier name...
Read more >Its giving an error that says remove active dot from current dot ...
What i tried to communicate, is that the removeClass(), addClass() and toggleClass() methods are expecting a “string representing the =class-name=” which will ...
Read more >Convert the Java-class-name (dot delimited package name)to ...
Convert the Java-class-name (dot delimited package name)to the equivalent ... with '/' and append ".class" ( possibly // after already removing it -...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I needed to whitelist classes similar to for example .mb-1.5 that we’re getting purged… Tried the
/^.[^\.]*\.[^\. "']*/g
regex and it worked 😃 thanks!This is also a problem for me.
I have this:
in the extractor whitelist
and this in my css (tailwind):
.component-tagBox.tag.valid { @apply bg-blue; }
and it doesn’t work.
It does work with a single class name in the CSS, e.g.,:
.component-tagBox { @apply bg-blue; }
But i need the compound class for it to do what I want to do using a third party vue comonent.
Any tips?