Closed Gastonite closed 9 months ago
Thanks for the report, it's a good call, I didn't think about this possibility when I first wrote it. I'd be happy to accept a PR that removes sorting of properties. It'd slightly affect CSS output size, but I think that's a reasonable trade-off when most of the time the property order is probably hard-coded anyway.
Changed in the latest major release.
First of all, thank you for this very useful library =)
I'm looking to apply CSS rules in a certain order, but it seems that the properties are alphabetically ordered, resulting in CSS whose properties don't follow the expected order.
For example, if I set the 'borderColor' property first, and then the 'borderBottomColor' property, I was expecting the most specific property to be set last, so as to override the most generic one.
Since the properties are ordered alphabetically, this does not produce the expected result:
I have created a Codesandbox example, where I was expecting the bottom border to be black, but it is not