Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Does Blazor Web Assembly work with CSS variables in CSS Isolation files?

$
0
0

Does CSS variables work in a Blazor component with CSS isolation files ?
When my component named Test.razor has no CSS isolation file and has the style set:

<h1 class="mh1">Test</h1><style>    :root {        --mblue:#0000ff;    }    .mh1{        color:var(--mblue);    }</style>

Test is indeed blue.
However if I put the styles in a isolation file name Test.razor.css it does not work.

:root {    --mblue: #0000ff;}.mh1 {    color: var(--mblue);}

The component Test resides in the index page:

@page "/"<Test></Test>

What am I doing wrong?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>