CSS isolation in Blazor

Viewed 190

I don't know how exactly this new feature must be work in Blazor, but I think that the current implementation work wrong. Below some typical situation:

Layout for some blazor component:

<button>
  <span>Some Text</span>
  <Icon> ... </Icon>
</button>    
  1. source scss file ...

source scss file

  1. that will be translated in to something like ...

that will be translated in to something like

  1. after apply of CSS isolation we have :-( ...

after apply of CSS isolation we have :-(

  1. Why NOT THIS????

Why NOT THIS?

And of course in DOM after rendering we have only button with scope id "b-l4md7xqlo6", but not span itself! Span don't have this attribute, and in my situation I don't need it. In other words, after applying of scope id, the result CSS not equal exactly to my declared CSS!

Any ideas?

Thanks, Nikolai

0 Answers
Related