© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•12mo ago
Zerthz

Formatting .CSS files in a blazor project

Howdy,

Sitting with a blazor project, .NET 8 wasm, it got some .CSS files, like the app.css and so one. I would like to just format these files in a sane way. I'm used to frontend in JS, and where I can just use prettier and save my files in vs code and it will format the file in a nice way.

The document formatter in Visual Studio works but it's so opinionated, it does the basic things like adding whitespace if missing, fixing indentation etc. But it doesn't respect blank lines. Even when they're put there on purpose to create clear structure. The vs code solution I'm used to has no issues with this, but visual studio just rips the blank lines out. I can't find any setting for this either, any tips?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

need blazor formatting help
C#CC# / help
2y ago
❔ Blazor/Razor markup formatting?
C#CC# / help
3y ago
❔ Blazor WebAssembly CSS
C#CC# / help
3y ago
✅ Error when including a project reference in a Blazor WASM project
C#CC# / help
3y ago