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

Replaced style-inject with style-implant #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivoilic
Copy link

@ivoilic ivoilic commented Aug 22, 2021

Summary

Replaces style-inject with style-implant which is being actively developed, has additional options, and doesn't include any breaking changes!

Background

I'm submitting this PR because of my own experience attempting to bugfix a project that was using rollup-plugin-postcss. I found my styles where being injected at the bottom rather than top of the head causing them override other styles. I realized this could be "fixed" by passing in an options object for the dependency style-inject. However, with literally only one option, open PRs for missing features, and no updates in 4 years style-inject is lacking. I've created a modern version of this library under the name style-implant. I've done my best to make it a drop in replacement for style-inject without any breaking changes besides the folder structure of the package itself.

Improvements

In addition to adding TypeScript support and tests, style-implant adds the ability to add attributes to your injected style tags and preserve the order of style tags injected in the top of the head.

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

Successfully merging this pull request may close these issues.

None yet

1 participant