Reputation: 6796
I read in many tutorials :
Just create a file containing the same filename of the page plus .css - Example: for Orders.razor, create a file Orders.razor.css
Add your style on the css file and have fun
Ok, but this is not working. So, what is the correct approach ? To reproduce:
Expected result: Hello, world! in red
Received: Hello, world! in black
Index.razor
@page "/"
<h1>Hello, world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />
Index.razor.css
h1 {
color: red
}
Upvotes: 4
Views: 3193