New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rehype-inline-css

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-inline-css

Rehype plugin for juice

  • 0.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-92.86%
Maintainers
1
Weekly downloads
 
Created
Source

Rehype Inline CSS

Rehype plugin to embed a stylesheet to each html elements.

Installation

npm install rehype-inline-css

Usage

import { unified } from 'unified'
import rehype from 'rehype-parse'
import stringify from 'rehype-stringify'
import inlineCss from './index.js'
const processor = unified().use(rehype).use(inlineCss).use(stringify)
const i = `<p>test</p><style>p { color: red; }</style>`
const o = processor.processSync(i).toString()
cosnole.log(o)

Now running the above script yields:

<p style="color: red;">test</p>

API

rehype().use(inlineCss)

Security

This plugin embeds all stylesheets in documents. Please take care of Suspicious stylesheets.

License

MIT © TANIGUCHI Masaya

https://git.io/mit-license

FAQs

Package last updated on 06 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc