bss icon indicating copy to clipboard operation
bss copied to clipboard

v2: Extract shorthands into helpers object

Open porsager opened this issue 7 years ago • 0 comments

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)
`

porsager avatar Nov 23 '18 09:11 porsager