samthor/scoped

is it possible to use it with stylesheet? (not inline css?)

gustavklopp opened this issue · 1 comments

Hi,
Nice project!
I'm scraping a website and this website loads itself its own css files which are messing with my own css file so a scoped stylesheet should be perfect.

So is it possible to scope a style which is not inline but from a css stylesheet?
Something like:

<div>
     	<link scoped rel="stylesheet" type="text/css" href="http://thissitecss.min.css'">
        ...((scraped part))...
</div>
((the linked css doesn't apply here))

It's definitely possible in that the code should supports doing an import:

@import "./other-css.css";

So try out:

<style scoped>
@import "https://example.com/other-css";
</style>

Note that the import statements need to be at the top of a style tag, before any rules.