Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2: Extract shorthands into helpers object #39

Open
porsager opened this issue Nov 23, 2018 · 0 comments
Open

v2: Extract shorthands into helpers object #39

porsager opened this issue Nov 23, 2018 · 0 comments

Comments

@porsager
Copy link
Owner

porsager commented Nov 23, 2018

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)
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant