You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What build tool (or framework if it abstracts the build tool) are you using?
tailwind-cli
What version of Node.js are you using?
v22.13.1
What browser are you using?
N/A
What operating system are you using?
Windows
Describe your issue
I have a Blazor project where some classes are in c#.
This works fine and generates the correct output, except for a specific case where my classes are wrapped in square braces.
The following code doesn't generate the expected gap-y-4, gap-y-6, and gap-y-8 classes in the output.
public enum StackSpacing
{
[CssClass("gap-y-4")]
Small,
[CssClass("gap-y-6")]
Medium,
[CssClass("gap-y-8")]
Large
}
If I remove the square brackets, then the expected classes are generated in the output.
If I put a space between the opening bracket ( [ ) and CssClass, then also the expected classes are generated in the output.
If I change the word "CssClass" to be lowercase, then also the expected classes are generated in the output.
The text was updated successfully, but these errors were encountered:
andrewrauber
changed the title
Class is ignored if within square brackets []
[v4] Class is ignored if within square brackets []
Feb 3, 2025
andrewrauber
changed the title
[v4] Class is ignored if within square brackets []
[v4] Class within square brackets [] is ignored
Feb 3, 2025
What version of Tailwind CSS are you using?
4.0.3
What build tool (or framework if it abstracts the build tool) are you using?
tailwind-cli
What version of Node.js are you using?
v22.13.1
What browser are you using?
N/A
What operating system are you using?
Windows
Describe your issue
I have a Blazor project where some classes are in c#.
This works fine and generates the correct output, except for a specific case where my classes are wrapped in square braces.
The following code doesn't generate the expected gap-y-4, gap-y-6, and gap-y-8 classes in the output.
If I remove the square brackets, then the expected classes are generated in the output.
If I put a space between the opening bracket ( [ ) and CssClass, then also the expected classes are generated in the output.
If I change the word "CssClass" to be lowercase, then also the expected classes are generated in the output.
The text was updated successfully, but these errors were encountered: