cis
critical-inline-styles
npm i critical-inline-styles
cis

critical-inline-styles

replaces link tags with inline style tags + inlines CSS url() calls with data URIs

by Max Ogden

1.0.1 (see all)License:BSDTypeScript:Not Found
npm i critical-inline-styles
Readme

inline critical styles.

This is a fork of: https://github.com/maxogden/inline-styles

This fork only targets critical or 'above the fold' inline css.

Example:

<link rel="stylesheet" type="text/css" atf="true" href="/assets/abovethefold.css">

The critical only style can be generated however you like, e.g. https://github.com/at-import/jacket

Remaining stylesheets can be loaded asynchronously using \<preload> like this:

<link rel="preload" type="text/css" href="/assets/app.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" type="text/css" href="/assets/app.css"></noscript>

inline-styles

replaces link tags with inline style tags + inlines CSS url() calls with data URIs

npm install inline-styles -g
inline-styles index.html > inlined.html

Downloads/wk

7

GitHub Stars

23

LAST COMMIT

8yrs ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
1.0.1
latest
6yrs ago
No alternatives found
No tutorials found
Add a tutorial