bss
bss copied to clipboard
v2: Extract shorthands into helpers object
I'm thinking the shorthands are actually better off being added as helpers instead of having them automatically mapped.
I feel there's too much uncertainty with the auto registration resulting from taking all browser registrered property names and mapping them to their shorthand by initials.
I think I'd rather specify them statically in a named export that can be added using .helper().
It would look something like this:
import b, { shorthands } from 'bss'
b.helper(shorthands)
Another one that I'd add in a simliar fashion would be unique values as property names. That would look like this:
import b, { shorthands, valueProps } from 'bss'
b.helper({
...shorthands,
...valueProps
})
// yay
b`
absolute
hidden
scale(2)
`