Skip to content

v2: Extract shorthands into helpers object #39

@porsager

Description

@porsager

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions