unified

Project: rehypejs/rehype-minify

Package: rehype-remove-style-type-css@2.0.2

  1. Dependencies: 0·Dependents: 1
  2. rehype plugin to remove type on CSS style and links
  1. unified 165
  2. plugin 130
  3. html 109
  4. rehype 73
  5. rehype-plugin 51
  6. minify 30
  7. mangle 30
  8. remove 10
  9. style 10
  10. css 10
  11. type 3

rehype-remove-style-type-css

Build Coverage Downloads Size Sponsors Backers Chat

Remove type on CSS style and links.

Install

npm:

npm install rehype-remove-style-type-css

Use

On the API:

 unified()
   .use(require('rehype-parse'))
+  .use(require('rehype-remove-style-type-css'))
   .use(require('rehype-stringify'))
   .process('<span>some html</span>', function (err, file) {
     console.error(report(err || file))
     console.log(String(file))
   })

On the CLI:

rehype input.html --use remove-style-type-css > output.html

Example

In
<link rel="stylesheet alternate" type="text/css" href="index.css">
<style type="text/css"></style>
Out
<link rel="stylesheet alternate" href="index.css">
<style></style>

Contribute

See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer