You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`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.
141
-
142
-
- Only HTML 5 is supported, not XHTML.
143
-
- Only CSS 3 is supported.
144
-
- Only UTF-8 encoding for string representation. Other document encodings are not yet supported.
145
-
146
138
## Bindings
147
139
148
140
`css-inline` is primarily a Rust library, but we also provide bindings for several other languages:
@@ -176,7 +168,7 @@ For full details of the options available, you can use the `--help` flag:
176
168
css-inline --help
177
169
```
178
170
179
-
## Extra materials
171
+
## Further reading
180
172
181
173
If you're interested in learning how this library was created and how it works internally, check out these articles:
`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.
154
-
155
-
- Only HTML 5 is supported, not XHTML.
156
-
- Only CSS 3 is supported.
157
-
- Only UTF-8 encoding for string representation. Other document encodings are not yet supported.
151
+
## XHTML compatibility
158
152
159
153
If you'd like to work around some XHTML compatibility issues like closing empty tags (`<hr>` vs. `<hr/>`), you can use the following snippet that involves `lxml`:
160
154
@@ -200,7 +194,7 @@ Besides performance, `css-inline` differs from other Python libraries for CSS in
`css-inline`inlines CSS into HTML documents, using components from Mozilla's Servo project.
8
+
`css-inline`is a high-performance library for inlining CSS into HTML 'style' attributes.
9
9
10
-
This process is essential for sending HTML emails as you need to use "style" attributes instead of "style" tags.
10
+
This library is designed for scenarios such as preparing HTML emails or embedding HTML into third-party web pages.
11
11
12
12
For instance, the library transforms HTML like this:
13
13
@@ -33,7 +33,7 @@ into:
33
33
</html>
34
34
```
35
35
36
-
- Uses reliable components from Mozilla's Servo
36
+
- Uses reliable components from Mozilla's Servo project
37
37
- Inlines CSS from `style` and `link` tags
38
38
- Removes `style` and `link` tags
39
39
- Resolves external stylesheets (including local files)
@@ -102,14 +102,6 @@ The `data-css-inline="ignore"` attribute also allows you to skip `link` and `sty
102
102
</body>
103
103
```
104
104
105
-
## Standards support & restrictions
106
-
107
-
`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.
108
-
109
-
- Only HTML 5 is supported, not XHTML.
110
-
- Only CSS 3 is supported.
111
-
- Only UTF-8 encoding for string representation. Other document encodings are not yet supported.
112
-
113
105
## License
114
106
115
107
This project is licensed under the terms of the [MIT license](https://opensource.org/licenses/MIT).
0 commit comments