FerchoCarcho FerchoCarcho - 1 month ago 9
Sass (Sass) Question

Target all classes following (with sass)

I wanna know how can I target the following classes

<div class="Table-divider__meta">
<div class="Table-divider__data">


I have this

.Table {

&-divider*{
@include breakpoint($md) {
@include display(flex);
@include flex-flow(row wrap);
@include flex-grow(1);
@include flex-basis(0);
}
}


But isnt working.

Answer

You can't do wild card matching in class selectors.

The clean approach would be to use multiple classes:

<div class="Table divider meta">
<div class="Table divider data">

and

.Table.divider {

}

Otherwise you can investigate attribute selectors, which do allow for a degree of pattern matching.

Comments