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

(feature) vendor prefixing #9

Closed
cristianbote opened this issue Feb 7, 2019 · 7 comments
Closed

(feature) vendor prefixing #9

cristianbote opened this issue Feb 7, 2019 · 7 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@cristianbote
Copy link
Owner

Figure out of this feature is needed

@cristianbote cristianbote added the feature New feature or request label Feb 7, 2019
@cristianbote cristianbote self-assigned this Feb 7, 2019
@imlinus
Copy link

imlinus commented Feb 7, 2019

If it's needed, then please have it made as a separate plugin,
I do love your goal of keeping it light <3

@cristianbote
Copy link
Owner Author

Hey @imlinus, that's a great idea! 😃 Thanks for your feedback!

@cristianbote
Copy link
Owner Author

Alrighty! 😄

So, it's been a couple of fun weeks. I've rewritten the css parser and all the under the hood compilation and I've managed to get the proper css support and generation - right now there are some corner cases, I believe.

With that in mind, what other libraries are doing, are using either https://github.com/thysultan/stylis.js or they make a case for post processing the statically extracted css. The part with statically extracted css, is really something that sounds great, but in the end it's not really. Max, the co-author of styled-components, has recently published this article(https://mxstbr.com/thoughts/css-in-js/) which goes into the exact issue.

So, bottom line, for now I think it's the user choice to include the proper vendor prefixing. If I were to add this feature, as you said, the size would increase dramatically and it'll be really hard to pick what to prefix or not.

Let me know what you think and feel free to open the ticket, again.

@robertwbradford
Copy link

Great library! I like the idea of a plugin or additional module which includes the option. We use currently use styled-components, and it is nice not to have to worry about adding them all over.

Perhaps it could work with https://github.com/browserslist/browserslist to determine which prefixes are needed.

@cristianbote
Copy link
Owner Author

I think a separate, pluggable, package for goober might be something worth looking into. We were discussing adding the styled.<tagName> support as well, as a separate package, so maybe this could be created as well as a package.

I'll reopen it, and see where it leads.

@cristianbote cristianbote reopened this Mar 8, 2019
@robertwbradford
Copy link

robertwbradford commented Mar 8, 2019

Sounds good!

<my-two-cents>
As for the styled.<tagName> syntax, while it is nice, it does start to add weight to the library. For me using styled("<tagName>") would be just fine, and it provides a single interface that works for HTML element names, React components, and custom elements.
</my-two-cents>

@JoviDeCroock
Copy link
Contributor

This should be implemented now for v2, I'll add some integration tests this weekend.

@cristianbote cristianbote added this to the v2.0.0 milestone Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants