chanan / BlazorStyled

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

How to combine Styled with existing classes like those defined in Bootstrap? #112

Open bryfa opened 4 years ago

bryfa commented 4 years ago
.myclass.card {   
    background-color: red;
    .card-title a {
        color: forestgreen;
    }
}

<div class="myclass card">
    <img class="card-img-top" src="https://via.placeholder.com/400" alt="some image">
    <div class="card-body">
        <h5 class="card-title"><a href="#">Title</a></h5>
        <p class="card-text">Text</p>
    </div>
    <div class="card-footer text-muted">

    </div>
</div>
qin-guan commented 4 years ago
<Styled @bind-Classname="@StylesClass">
</Styled>

<div class="@($"{StylesClass} bootstrap-class")"/>

is this what you are asking?

chanan commented 3 years ago

@bryfa Did qin-guan's answer help you?

bryfa commented 3 years ago

Sorry for the late answer. Yes it did help me, thanks!