I am trying to figure out how I can change the text color for a Blazor application via CSS setting.
As an experiment, I creating a new (default) Blazor WebAssembly application in Visual Studio 2019. Then I am trying to change the test color of the navigation elements on the left-hand side, but no matter which CSS file I am modifying I don't seem to get the correct effect.
The relevant Razor markup looks like this (in NavMenu.razor):
<li class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</li>
which renders in HTML like this:
<li class="nav-item px-3" b-qdt7h34qew="">
<!--!-->
<a href="fetchdata" class="nav-link">
<!--!-->
<span class="oi oi-list-rich" aria-hidden="true" b-qdt7h34qew=""></span> Fetch data
</a>
</li>
I have tried both
.nav-item { color: orange; }
and
.nav-link { color: orange; }
in either the NavMenu.razor.css or the css/app.css file but neither seems to work.
What is the correct way to set this css setting so the text 'Fetch data' appears as an orange text?