# gulp-inline_css

> Inline remote or local linked css in an html file

Latest version **1.1.1** (published 2016-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-inline_css
pnpm add gulp-inline_css
yarn add gulp-inline_css
bun add gulp-inline_css
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2016-01-31 |
| First published | 2015-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | addy |
| Maintainers | iamaddy |
| Keywords | gulpplugin, inline, css, html |

## Links

- npm: https://www.npmjs.com/package/gulp-inline_css
- Repository: https://github.com/iamaddy/gulp-inline_css
- Issues: https://github.com/iamaddy/gulp-inline_css/issues
- npm.io page: https://npm.io/package/gulp-inline_css

## Dependencies (8)

- [batch](https://npm.io/package/batch.md) ^0.5.2
- [cheerio](https://npm.io/package/cheerio.md) ^0.19.0
- [bluebird](https://npm.io/package/bluebird.md) ^2.9.25
- [through2](https://npm.io/package/through2.md) ^0.6.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.0
- [style-data](https://npm.io/package/style-data.md) ^1.0.0
- [href-content](https://npm.io/package/href-content.md) ^1.0.0
- [list-stylesheets](https://npm.io/package/list-stylesheets.md) ^1.0.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-01-31
- 1.1.0 — 2016-01-09
- 1.0.10 — 2016-01-09
- 1.0.9 — 2016-01-02
- 1.0.8 — 2015-12-29
- 1.0.7 — 2015-12-28
- 1.0.6 — 2015-12-27
- 1.0.5 — 2015-12-26
- 1.0.4 — 2015-12-26
- 1.0.3 — 2015-12-26
- 1.0.2 — 2015-12-26
- 1.0.1 — 2015-12-26
- 1.0.0 — 2015-12-26

## README

## How It Works
This gulp plugin takes an html file and inlines the CSS into the html.

file.html:
```
<html>
<head> 
  <link rel="stylesheet" href="//xxx.com/style.css?__inline">
</head>
<body>
  <p>Test</p>
</body>
</html>
```

link must with the flag '?__inline'.

//xxx.com/style.css:
```
p {
  color: red;
}
```
Output:
```
<html>
<head>
</head>
<style type="text/css">
    p {
  color: red;
}
</style>
<body>
  <p>Test</p>
</body>
</html>

```
## Install
```
npm install --save-dev gulp-inline_css
```

## Usage

    var gulp = require('gulp'),
    inlineCss = require('gulp-inline_css');
 
    gulp.task('default', function() {
        return gulp.src('./**/*.html')
            .pipe(inlineCss())
            .pipe(gulp.dest('build/'));
    });

---
_Source: https://npm.io/package/gulp-inline_css · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
