csjs
csjs copied to clipboard
How to define complex selectors for global styles?
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..
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} {
...
}
`