cristianbote / goober

🥜 goober, a less than 1KB 🎉 css-in-js alternative with a familiar API
https://goober.rocks
MIT License
3.11k stars 118 forks source link

Running prefixer for nested objects #548

Open jsau- opened 1 year ago

jsau- commented 1 year ago

At present it seems like the prefixer module is only invoked if:

(See https://github.com/cristianbote/goober/blob/master/src/core/parse.js)

There are use-cases I can see for wanting to run the prefixer for property names where the value is an object. Examples might include wanting to prefix &::placeholder { /* ... */ } to the following:

&::-webkit-input-placeholder { /* ... */ }
&:-moz-placeholder { /* ... */ }
&::-moz-placeholder { /* ... */ }
&:-ms-input-placeholder { /* ... */ }
&::-ms-input-placeholder { /* ... */ }
&::placeholder { /* ... */ }

Is there any danger in also running the prefixer on property names when the value is of type object? (I've checked the type declarations for the prefixer and at present it's expecting a value of type any).