Skip to content

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.

1 participant