csjs icon indicating copy to clipboard operation
csjs copied to clipboard

How to define complex selectors for global styles?

Open avesus opened this issue 8 years ago • 1 comments

Like these:

.my-nav-tabs li .active {
  ...
}

when .active is in global scope or is an another class defined in the same csjs literal or imported from another csjs variable..

avesus avatar Sep 14 '16 21:09 avesus

If it's defined in the same csjs literal, both instances of .active will be scoped to the same value so there's no change needed. If .active is from another csjs instance, you can pass it in:

csjs`
.my-nav-tabs li ${styles.active} {
  ...
}
`

rtsao avatar Sep 19 '16 15:09 rtsao