threepointone/glamor

be clear in documentation that css.insert expects single rules

Opened this issue · 4 comments

Previously it was possible to insert multiple rules at once using Glamor. This appears to have broken sometime between v2.20.25 and v2.20.40. Eg, I used to be able to do this:

css.insert(`h1 { color: red }
h2 { color: blue }
h3 { color: green }`)

But sometime recently this behavior was removed and I see no warnings or errors when attempting this. Was this an intended change? If so, why was it changed?

It was never possible to do this. Rather, it's possible in dev mode, but fails in prod mode. You need to insert rules one by one (hence, insert"Rule")

Strange, for some reason I thought it was supported. Perhaps that could be made clear in the docs as it's not clear on first blush. Thanks for the quick reply!

Good point. I'll leave this open till I update the docs in whatever fashion.