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

Running prefixer for nested objects #548

Open
jsau- opened this issue Jun 9, 2023 · 0 comments
Open

Running prefixer for nested objects #548

jsau- opened this issue Jun 9, 2023 · 0 comments

Comments

@jsau-
Copy link

jsau- commented Jun 9, 2023

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

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