chanan / BlazorStyled

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

Feature request: Define multiple styles at once #75

Closed chanan closed 4 years ago

chanan commented 4 years ago

Ability to define multiple styles at the same time. Not sure it can work, but maybe something like this:

<Styled @bind-Classenames="@classes">
    [0] {
        color: red;
    }
    [1] {
        color: hotpink;
    }
</Styled>

<div class="@classes[0]">
  This is red
<div>

<div class="@classes[1]">
  This is hot pink
<div>

@code {
  private List<string> classes = new List<string>()
}
chanan commented 4 years ago

This most likely won't work