typestyle / typestyle

Making CSS Typesafe 🌹

Home Page:https://typestyle.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generation fails when trailing comma is present in nested selector

craigkovatch opened this issue · comments

TypeStyle 2.0.4

Works:

const SomeStyleName = TypeStyle.style({
  $nest: {
    '&:active, &[aria-expanded="true"]': { ... }
  }
}

Fails:

const SomeStyleName = TypeStyle.style({
  $nest: {
    '&:active, &[aria-expanded="true"],': { ... }
  }
}

My real code is doing some concatenation into a const to generate the selector string, so it would be nice if it didn't have to worry about the trailing comma.