[Blazor] Intellisense for CSS-style string parameters (such as <QuickGrid Class="..." />
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
In Visual Studio and other IDEs, when I type `
I'd love to see similar Intellisense support for CSS-style Razor component parameters like ``.
### Describe the solution you'd like
Something like (+ corresponding support in IDE):
```csharp
[StringSyntax(StringSyntax.CssClass)]
[Parameter] public string? Class { get; set; }
```
This approach is already used for XML, Regex, JSON, ...
### Additional context
I'm the maintainer of [HAVIT Blazor](https://havit.blazor.eu/), and almost all our components have `CssClass` parameters (and often additional ones like `ItemCssClass`, `HeaderCssClass`, `BodyCssClass`, etc.).
It's a real pain point for our users that they don't get the same Intellisense for these parameters as they do for the standard HTML `class` attribute.
And it's definitely not just us - most component libraries have similar parameters: FluentUI, MudBlazor, you name it.
Contributor guide
Research direction
Start by tracing the existing StringSyntax support for XML, Regex, and JSON in Roslyn, then identify the corresponding Razor and IDE handling for component parameters. Done means CSS-style parameters such as Class, CssClass, ItemCssClass, HeaderCssClass, and BodyCssClass receive CSS class IntelliSense like an HTML class attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, css
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100