CSS Styles not being applied in razor, not sure why
Hi, it appears that my css styles are not taking effect in a nested layout in blazor, what other information can I provide?
14 Replies
Basically, I can select a css class, and style it, but for some reason it's not letting me style any children of an element.
aha, NavLink doesn't appear to get the unique scoping
Did you fix it
nope
basically the highlighted thing is missing when i use <NavLink>
and as such it is not being styled
What kind of website you makin
I'm using Blazor
ASP.NET Core Blazor
Explore ASP.NET Core Blazor, a way to build interactive client-side web UI with .NET in an ASP.NET Core app.
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Stack Overflow
Blazor style stops working when included as component
To reproduce this issue, I created a MenuItemComponent
<li class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class=&q...
this SO post appears to have a solution, working through it
if i prefix anything that affects the navlink tag with ::deep then it appears to solve it
rider is having issues with seeeing it as valid (https://youtrack.jetbrains.com/issue/RIDER-62195/Razor-CSS-Unknown-pseudo-selector-deep-deep) but i just disabled the inspection and am coping
Sorry I don’t know much advanced html and css, I just know how to build pages and not rlly debug them
no worries haha, i think i've gotten there