Replies: 1 comment 2 replies
-
You could consider configuring a content transformer that replaces |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is probably mostly for the container queries plugin, but I'm doing frontend in ASP.net Core (razor cshtml), where the @-sign is used to put in variables, like
<h1>@headline</h1>
.This makes it hard to use the container queries plugin, because it requires classes and variants to be prefixed with @, like
<div class="@container"><div class="bg-red @sm:bg-blue"></div></div>
To do this in razor cshtml, I need to either put the value in a string, or escape the @-sign, so either
<div class="@("@container")"><div class="@("bg-red @sm:bg-blue")"></div></div>
or<div class="@@container"><div class="bg-red @@sm:bg-blue"></div></div>
I prefer the last one, it's much easier to write. But it makes tailwindcss unable to find the @container and @sm:bg-blue classes, because the @'s are doubled.
Is there any way the class finder can be made aware of this, so in cshtml files a double @@ is counted as a @. I guess in PHP there would be a similar problem with $'s.
I've also suggested making the @ configurable in the plugin, but I think having escape-aware class finding is the better option. tailwindlabs/tailwindcss-container-queries#22
Beta Was this translation helpful? Give feedback.
All reactions