andreypopp/react-css-components

Problem with CSS pseudo-element with "-" (first-child, last-child etc.)

KacperKozak opened this issue · 4 comments

Pseudo-element with - don't work properly.

eg.:

Label:first-child {
    border-left: none;
}

In transpiled file looks like this:

// ...
var className = styles.Label + (variant.first-child ? ' ' + styles.Label__first-child : '');
// ...

And selector will be: .Label__first-child---36X92.

@andreypopp Do you know how to fix it?

Would be happy if you can submit a PR with a failing test and a fix! Feel free to ask me questions if any!

@andreypopp Ok I'll try to fix it.