Skip to content

Running prefixer for nested objects #548

Description

@jsau-

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

  • The property name does not begin with @
  • The value is not an object
  • The value is not undefined

(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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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