Skip to content

StringSyntax.CssClass #8930

Open
Open
@En3Tho

Description

@En3Tho

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I'm not sure where to put this request as it might be an IDE request, might be a sort of blc request (add StringSyntax value) or AspNetCore request (because blazor/css related).
Consider these examples in Blazor:

<div class="unconditionalStyle @(someCondition ? "class1" : "class2")">
</div>
<div class="unconditionalStyle @If(condition1, "someClass") @If(condition2, "someAnotherClass1" : "someAnotherClass2")">
</div>

I guess the first one should be automatically inferred as cssClass if possble and highlighted as such. Second one can be augmented with StringSyntax attribute and treat string accordingly. For example ReSharper already supports StringSyntax("css") (not "cssClass") but maybe this can be utilized in VS too.

Describe the solution you'd like

Implement a solution to recognize "cssClass" syntax.

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions