File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 19
19
Existing packages like
20
20
[ get-css] ( https://github.com/cssstats/cssstats/tree/master/packages/get-css )
21
21
look at a server-generated piece of HTML and get all the ` <link> ` and ` <style> `
22
- tags from it. This works fine for 100% server rendered pages, but apps that
23
- employ style injection with JavaScript will not be covered .
22
+ tags from it. This works fine for 100% server rendered pages, and pages with
23
+ CSS-in-JS styling .
24
24
25
25
### Solution
26
26
27
27
This module uses an instance of Chromium to render a page. This has the benefit
28
28
that most of the styles can be rendered, even when generated by JavaScript. The
29
29
[ Puppeteer CSSCoverage API] ( https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#coveragestartcsscoverageoptions )
30
30
is the power behind finding most of the CSS. Additionally, the
31
- ` document.styleSheets ` API is used.
31
+ ` document.styleSheets ` API is used to get CSS-inJS styling .
32
32
33
33
## Installation
34
34
You can’t perform that action at this time.
0 commit comments