css-inline
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -7,3 +7,3 @@ { | ||
"description": "High-performance library for inlining CSS into HTML 'style' attributes", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "repository": { |
# css-inline | ||
[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/Stranger6667/css-inline/build.yml?style=flat-square&labelColor=555555&logo=github" height="20">](https://github.com/Stranger6667/css-inline) | ||
[<img alt="npm" src="https://img.shields.io/npm/v/css-inline?style=flat-square" height="20">](https://github.com/Stranger6667/css-inline/actions?query=branch%3Amaster) | ||
[<img alt="npm" src="https://img.shields.io/npm/v/css-inline?style=flat-square" height="20">](https://www.npmjs.com/package/css-inline) | ||
[<img alt="codecov.io" src="https://img.shields.io/codecov/c/gh/Stranger6667/css-inline?logo=codecov&style=flat-square&token=tOzvV4kDY0" height="20">](https://app.codecov.io/github/Stranger6667/css-inline) | ||
[<img alt="gitter" src="https://img.shields.io/gitter/room/Stranger6667/css-inline?style=flat-square" height="20">](https://gitter.im/Stranger6667/css-inline) | ||
`css-inline` inlines CSS into HTML documents, using components from Mozilla's Servo project. | ||
`css-inline` is a high-performance library for inlining CSS into HTML 'style' attributes. | ||
This process is essential for sending HTML emails as you need to use "style" attributes instead of "style" tags. | ||
This library is designed for scenarios such as preparing HTML emails or embedding HTML into third-party web pages. | ||
@@ -17,3 +17,2 @@ For instance, the library transforms HTML like this: | ||
<head> | ||
<title>Test</title> | ||
<style>h1 { color:blue; }</style> | ||
@@ -31,5 +30,3 @@ </head> | ||
<html> | ||
<head> | ||
<title>Test</title> | ||
</head> | ||
<head></head> | ||
<body> | ||
@@ -41,3 +38,3 @@ <h1 style="color:blue;">Big Text</h1> | ||
- Uses reliable components from Mozilla's Servo | ||
- Uses reliable components from Mozilla's Servo project | ||
- Inlines CSS from `style` and `link` tags | ||
@@ -66,4 +63,3 @@ - Removes `style` and `link` tags | ||
<head> | ||
<title>Test</title> | ||
<style>h1 { color:red; }</style> | ||
<style>h1 { color:red }</style> | ||
</head> | ||
@@ -92,3 +88,2 @@ <body> | ||
<head> | ||
<title>Test</title> | ||
<style>h1 { color:blue; }</style> | ||
@@ -107,3 +102,2 @@ </head> | ||
<head> | ||
<title>Test</title> | ||
<!-- Styles below are ignored --> | ||
@@ -117,12 +111,4 @@ <style data-css-inline="ignore">h1 { color:blue; }</style> | ||
## Standards support & restrictions | ||
`css-inline` is built on top of [html5ever](https://crates.io/crates/html5ever) and [cssparser](https://crates.io/crates/cssparser) and relies on their behavior for HTML & CSS parsing. | ||
- Only HTML 5 is supported, not XHTML. | ||
- Only CSS 3 is supported. | ||
- Only UTF-8 encoding for string representation. Other document encodings are not yet supported. | ||
## License | ||
This project is licensed under the terms of the [MIT license](https://opensource.org/licenses/MIT). |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
1111915
108