C
C#6mo ago
OskarZyg

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
OskarZyg
OskarZyg6mo ago
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
fshollow
fshollow6mo ago
Did you fix it
OskarZyg
OskarZyg6mo ago
nope
OskarZyg
OskarZyg6mo ago
basically the highlighted thing is missing when i use <NavLink>
No description
OskarZyg
OskarZyg6mo ago
and as such it is not being styled
fshollow
fshollow6mo ago
What kind of website you makin
OskarZyg
OskarZyg6mo ago
I'm using Blazor
OskarZyg
OskarZyg6mo ago
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.
fshollow
fshollow6mo ago
$details
MODiX
MODiX6mo ago
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)
OskarZyg
OskarZyg6mo ago
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...
OskarZyg
OskarZyg6mo ago
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
fshollow
fshollow6mo ago
Sorry I don’t know much advanced html and css, I just know how to build pages and not rlly debug them
OskarZyg
OskarZyg6mo ago
no worries haha, i think i've gotten there