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
Hello friends. I needs to use the @ in the class attribute of NavLink but it doesn't work.
I'm using Tailwind with their container queries classes in my Blazor Server project. The container queries classes have @ into their class names. I'm using the double @ as follows:
But i'm getting an error with the message: Component attributes do not support complex content (mixed C# and markup). Attribute: 'class', text: 'current:text-primary-700 @sm:pl-4'.
It works with normal html tags like div but not for NavLink.
At the moment I think adding another div would work for what I'm doing but I'd prefer to keep the number of html elements as low as possible in my project.
Is there an existing issue for this?
Describe the bug
Hello friends. I needs to use the
@
in the class attribute of NavLink but it doesn't work.I'm using Tailwind with their container queries classes in my Blazor Server project. The container queries classes have
@
into their class names. I'm using the double@
as follows:But i'm getting an error with the message:
Component attributes do not support complex content (mixed C# and markup). Attribute: 'class', text: 'current:text-primary-700 @sm:pl-4'
.It works with normal html tags like
div
but not forNavLink
.At the moment I think adding another div would work for what I'm doing but I'd prefer to keep the number of html elements as low as possible in my project.
Expected Behavior
I just want that my anchor tag to be rendered
Steps To Reproduce
In any Blazor project, try using an
@
in the class attribute of anyNavLink
.Exceptions (if any)
CSC : error RZ9986: Component attributes do not support complex content (mixed C# and markup).
.NET Version
6.0.15
Anything else?
The text was updated successfully, but these errors were encountered: