export css file rather than injecting style tag
hexiro opened this issue · comments
Would it be possible to do what some other libraries do (namely, react-tippy) and export a css file rather than injecting a script tag? This way next can handle the styles, minify and bundle them with the other styles.
For backwards compatibility, you could have a prop called injectStyles
and have it default to true. If you'd like
Lmk what you think :)
Reference (react-tippy):
First, you need import css
import 'react-tippy/dist/tippy.css'
Edit: After revisiting, I see that the reason this is probably done is because color and height are injected into the css from the params passed by the user. I'm not against this, but I think that the style tag should atleast be minified.
nextjs-progressbar/src/index.tsx
Line 109 in a122fd2
This would also make the W3C validator happy :)