Stranger6667 / css-inline

High-performance library for inlining CSS into HTML 'style' attributes
https://css-inline.org/
MIT License
241 stars 29 forks source link

Styles not extracted correctly in Nuxt > 3.8.0 #270

Closed bogdanciuca closed 10 months ago

bogdanciuca commented 11 months ago

I am using nuxt-og-image, which has a dependency on this package (and Satori), to generate OG images for my web apps.

Unfortunately, after the release of nuxt 3.8.1, styles don't seem to be extracted correctly anymore, breaking the generated images.

For more details, please have a look at the initial issue.

Stranger6667 commented 11 months ago

Thanks for reporting!

From the referred issue it is not completely clear to me why it happens. Could you share some example, so I can reproduce the problem?

css-inline parses "style" and "link" tags in order to get styles, additional styles can be passed via the extra_css config option. My assumption is that these mechanisms should cover the common use cases, but if they are not, I am open to extending them.

Stranger6667 commented 11 months ago

By any chance, can it be caused by double quotes? like this one

bogdanciuca commented 11 months ago

To be honest, I have no idea why this happens. I assume something changed in latest Nuxt versions, which broke the compatibility. But yes, I can definitely provide a repo with a minimal reproduction.

harlan-zw commented 11 months ago

Sorry @bogdanciuca, I think I may not have explained the upstream issue properly, this is a Nuxt upstream issue that I'll need to investigate further, not an issue with this package.

I do have this issue open for webworker support https://github.com/Stranger6667/css-inline/issues/260

I think this can be closed.

harlan-zw commented 10 months ago

This can be closed FYI :)