Extract all CSS from a given url, both server side and client side rendered.
npm install extract-css-coreExtract all CSS from a given url, both server side and client side rendered.

!Node.js CI
``js
const extractCss = require('extract-css-core')
const css = await extractCss('https://www.projectwallace.com')
//=> html{font-size:100%} etc.
`
Or, if you want more details:
`js
const entries = await extractCss('https://www.projectwallace.com', {
origins: 'include'
})
// entries will look something like this
[
{
href: 'https://www.projectwallace.com',
type: 'link',
css: '@font-face{font-display:swap;font-family:Teko;...'
},
{
href: 'https://www.projectwallace.com/client/Seo.0f4fe72f.css',
type: 'style',
css: '.hero__text.svelte-qhblau a{color:var(--teal-400)}...'
},
{
href: 'https://www.projectwallace.com/client/some-css-file.css',
type: 'import',
css: '.some-css {}'
},
{
href: 'https://www.projectwallace.com',
type: 'inline',
css: '[x-extract-css-inline-style] { position: absolute; }'
}
]
`
`sh`
npm install extract-css-coreor
yarn add extract-css-core
Existing packages like
get-css
look at a server-generated piece of HTML and get all the and