chanan / BlazorStyled

CSS in Blazor Components
https://blazorstyled.io
The Unlicense
191 stars 19 forks source link

Throw if theme is not set #97

Open imtrobin opened 4 years ago

imtrobin commented 4 years ago

Hi, currently it is not reporting any error if the theme it not specified e.g

<Styled>
body {
        background-color:           [theme.ThisDoesNotExist];
    }
</Styled>

If I use the csharp API, it will throw theme.ThisDoesNotExist but on the html tag, no error is reported, and it's very hard to spot the error.

chanan commented 4 years ago

This won't be included in v3. I need to think about this and see if this should throw or leave it as is. The reason leaving it as is could be correct, is the order of operations, in that the theme value is not set yet, but it will "eventually" - and when it does, the background color (in your example) will get set.