razor icon indicating copy to clipboard operation
razor copied to clipboard

Blazor component - one click feature to add scoped css

Open vsfeedback opened this issue 2 years ago • 1 comments

This issue has been moved from a ticket on Developer Community.


Hi,

I'd like to suggest adding a feature to add scoped css for a blazor component with one click (e.g. in the right-click menu).

I quite often use scoped css in my projects, and adding one is not at all efficient. Every single time I have to copy the component, change it's name to razor.cs, delete the content, and only then I can start using scoped css.

It would be great to be able to right-click on the blazor component and select "add scoped css" instead of doing everything manually.

Kind regards, Alex


Original Comments

Feedback Bot on 3/15/2023, 02:25 AM:

(private comment, text removed)

vsfeedback avatar Mar 30 '23 21:03 vsfeedback

If anyone is watching this issue, whilst not exactly the same there is a new code action in 2026 Insiders to extracting a style block to the right .razor.css file.

davidwengier avatar Oct 12 '25 07:10 davidwengier