NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #2436 most downloaded on PyPI
High-performance library for inlining CSS into HTML 'style' attributes
Latest stable
0.24.0
Last release 10 days ago
12 Nov 2026
Release timing varies
gaps range from 2 weeks to 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
63 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Support for the :has() pseudo-class. #889
:has() pseudo-class. #8891.88.selectors to 0.42.:has() pseudo-class. #8891.88.selectors to 0.42.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Native binding version check expecting 0.22.1 instead of the package version, failing when NAPI_RS_ENFORCE_VERSION_CHECK is set.
0.22.1 instead of the package version, failing when NAPI_RS_ENFORCE_VERSION_CHECK is set.inline and inline_fragment without copying it.<style> content for remove_inlined_selectors without intermediate copies.:hover, before matching them.:root..a .b or #x > p when no ancestor has the required names, on documents of 1 KB or more.!important not recognised when written in uppercase or with whitespace or comments after !.id being styled in documents of 1 KB or more.H1) not matching HTML elements in documents of 1 KB or more.class not matching in documents of 1 KB or more.:not(), attribute values, or strings, so a part of a selector could match on its own.<html> or <body> tags being dropped, and existing ones duplicated.keep_at_rules is combined with remove_inlined_selectors or keep_style_tags.class ([class], [class*=...], etc.) never matching.Support for CSS cascade layers ( @layer ). #340
@layer). #340var()) to their values with the resolve_css_variables option. #180reqwest to 0.13.@layer). #340var()) to their values with the resolve_css_variables option. #180http feature. Remote stylesheets load through the *_async functions. #264inline_async, inline_to_async, inline_fragment_async and inline_fragment_to_async, as top-level functions and CSSInliner methods, behind the async feature. External stylesheets are fetched concurrently. #246StylesheetResolver::retrieve_async for custom non-blocking resolvers.lexopt for CLI argument parsing.reqwest to 0.13.rayon with a std::thread worker pool in the CLI.Error parsing arguments: invalid option '--foo'.--load-remote-stylesheets CLI flag rejected without an explicit =true value.-- end-of-options marker rejected by the CLI.-V not accepted by the CLI as an alias for --version.inlineAsync and inlineFragmentAsync, loading external stylesheets concurrently without blocking the event loop.inlineAsync and inlineFragmentAsync in the WASM module, loading remote stylesheets with fetch. #264@layer). #340var()) to their values with the resolveCssVariables option. #180reqwest to 0.13.remove_inlined_selectors removed @ -rules from the <style> blocks it rewrites when keep_at_rules is enabled (it should keep them). #815
remove_inlined_selectors removed @-rules from the <style> blocks it rewrites when keep_at_rules is enabled (it should keep them). #815remove_inlined_selectors removed @ -rules from the <style> blocks it rewrites (it should remove only inlined selectors).
cssparser to 0.38.html5ever to 0.40.selectors to 0.41.remove_inlined_selectors removed @-rules from the <style> blocks it rewrites (it should remove only inlined selectors).class attribute values not HTML-escaped in the output, allowing markup injection via " in a class value. GHSA-jh54-c7gc-mvcccssparser to 0.38.html5ever to 0.40.selectors to 0.41.magnus to 0.9.remove_inlined_selectors removed @-rules from the <style> blocks it rewrites (it should remove only inlined selectors).class attribute values not HTML-escaped in the output, allowing markup injection via " in a class value. GHSA-jh54-c7gc-mvccPyodide 3.14 wheels for the pyemscripten_2026_0 platform. #786
pyemscripten_2026_0 platform. #786x64-mingw-ucrt). Installing no longer requires a Rust toolchain on these platforms.file:// stylesheet URLs not percent-decoded and broken on Windows drive letters.
file:// stylesheet URLs not percent-decoded and broken on Windows drive letters.With keep_at_rules enabled, at-rules without a block (e.g. @import ) lost their prelude and terminator, fusing with the following rule ( @import@media
keep_at_rules enabled, at-rules without a block (e.g. @import) lost their prelude and terminator, fusing with the following rule (@import@media ...) and producing a stylesheet browsers reject entirely.width/height HTML attributes not derived from an element's own inline style attribute. #725
1.85.selectors to 0.38.cssparser to 0.37.width/height HTML attributes not derived from an element's own inline style attribute. #725selectors to 0.38.cssparser to 0.37.PyO3 to 0.29.0.width/height HTML attributes not derived from an element's own inline style attribute. #725inline_fragment silently returning only whitespace when the input starts with whitespace or contains structural HTML tags ( , , , ). #692 #693
!important lost when inlining styles onto elements with existing inline style attributes. #682
InlineOptions::apply_width_attributes and InlineOptions::apply_height_attributes options to add dimension HTML attributes from CSS properties on suppo
InlineOptions::apply_width_attributes and InlineOptions::apply_height_attributes options to add dimension HTML attributes from CSS properties on supported elements (table, td, th, img). #652apply_width_attributes and apply_height_attributes options to add dimension HTML attributes from CSS properties on supported elements (table, td, th, img). #652PyO3 to 0.28.0.Inline !important styles being overwritten by stylesheet !important styles. #637
html5ever to 0.38.selectors to 0.35.!important styles being overwritten by stylesheet !important styles. #637InlineOptions::remove_inlined_selectors option to remove selectors that were successfully inlined from blocks.
InlineOptions::remove_inlined_selectors option to remove selectors that were successfully inlined from <style> blocks.cssparser to 0.36.html5ever to 0.36.selectors to 0.33.### Added - minify_css option #12 ### Changed - Bump MSRV to 1.80 - Update selectors to 0.32.
minify_css option #121.80PyO3 to 0.27.0.selectors to 0.32.keepAtRules option to keep all "at-rules" (ones starting with @) inside a "style" element. #265
keepAtRules option to keep all "at-rules" (ones starting with @) inside a "style" element. #265CLI: --extra-css-file option to load additional CSS from files. #67
--extra-css-file option to load additional CSS from files. #67pico-args1.75.selectors to 0.30.html5ever to 0.35.!important that has insignificant whitespace after it.style element name.!important.1.75.selectors to 0.30.html5ever to 0.35.3.9 in requires-python key in pyproject.toml.!important that has insignificant whitespace after it.style element name.!important.Slightly improve the performance of HTML serialization.
1.71.1.cssparser to 0.35.html5ever to 0.31.selectors to 0.28.PyO3 to 0.25.0.cssparser to 0.35.html5ever to 0.31.selectors to 0.28.### Fixed - Packaging issue.
Slightly improve performance of HTML serialization.
Prioritize !important rules when computing element styles. #398
!important rules when computing element styles. #398Replace double quotes when merging styles. #392
PyO3 to 0.22.0.1.70.Precedence of element styles over other styles. #364
External stylesheet caching. #314
html5ever to 0.27.PyO3 to 0.21.0.A way to customize resolving remote stylesheets.
data-css-inline="keep" attribute to enforce keeping the style tag.attohttpc with reqwest to simplify implementing non-blocking stylesheet resolving in the future release.nth-child. #324Display stylesheet location in network-related errors.
std::error::Error::source for InlineError.Avoid iterating over non-Element nodes.
Replace double quotes in all property values.
indexmap to 2.1.cssparser to 0.31.2.selectors to 0.25.1.65.indexmap to 2.1.cssparser to 0.31.2.selectors to 0.25.1.65.PyO3 to 0.20.0.built to 0.7.1.manylinux version for aarch64 wheels to 2_24.The inline_style_tags option to control whether inlining from "style" tags should be performed. #253
inline_style_tags option to control whether inlining from "style" tags should be performed. #2531.63.Pre-allocate space during serialization.
class attribute handling: up to 25% faster for extensive class-dependent selectors.FxHasher in more cases.memchr.1.62.1.Applying new styles only to the first matching tag during styles merging. #224
Optimized HTML serialization for a performance boost of up to 25%.
Standardized the formatting of CSS declarations: now consistently using : separator between properties and values.
: separator between properties and values.Use a simpler way for HTML tree traversal.
keep_link_tags configuration option.
keep_link_tags configuration option.remove_style_tags with keep_style_tags.inline_style_tags configuration option.Serialize all HTML attributes without escaping. #184
PyO3 to 0.19.0.Distribute typing information. #167
Support for the file:// URI scheme in base_url. #171
file:// URI scheme in base_url. #171--output-filename-prefix CLI option to control the output files prefix.
--output-filename-prefix CLI option to control the output files prefix.file:// URI scheme in base_url. #1711 exit code if any of the input files were not processed successfully via CLI.data-css-inline="ignore" attribute to ignore CSS inlining. #10data-css-inline="ignore" attribute to ignore CSS inlining. #10
data-css-inline="ignore" attribute to ignore CSS inlining. #10PyO3 to 0.17.2.Ignoring selectors' specificity when applying declarations from different qualified rules. #148
!important rules not overriding inlined styles. #152New http & file features which give a way to disable resolving external stylesheets and reduce the compiled artifacts size.
http & file features which give a way to disable resolving external stylesheets and reduce the compiled artifacts size.!important rules not overriding inlined styles. #152padding and padding-top. #142Not respecting specificity in case of inlining overlapping rules like padding and padding-top. #142
padding and padding-top. #142Separate InlineError::MissingStyleSheet error variant to improve debugging experience. #124
InlineError::MissingStyleSheet error variant to improve debugging experience. #124Invalid handling of double-quoted property values like in font-family: "Open Sans". #129
font-family: "Open Sans". #129### Added - Python 3.10 builds. ### Changed - Update PyO3 to 0.15.1.
PyO3 to 0.15.1.Invalid handling of double-quoted property values like in font-family: "Open Sans". #129
font-family: "Open Sans". #129std::fs::read_to_string in CLI to avoid over/under allocating of the input buffer.Panic on invalid URLs for remote stylesheets.
Optimize loading of external files.
rayon to 1.5.PyO3 to 0.14.1.Avoid allocations in error formatting.
Incorrect override of exiting style attribute values. #113
style attribute values. #113to_string implementation on &&str.ahash.style attribute values. #113Ignored style tags when the document contains multiple of them and the remove_style_tags: true config option is used. #110
style tags when the document contains multiple of them and the remove_style_tags: true config option is used. #110Ignored selectors specificity. #108
Source code distribution. It was missing the source code for the underlying Rust crate and were leading to a build error during pip install css-inline
pip install css-inline on platforms that we don't have wheels for.
#99Compatibility with the new cssparser crate version.
cssparser crate version.ParseError to InlineError.cssparser crate version.ParseError to InlineError.Links to remote stylesheets are deduplicated now.
Pyo3 to 0.12.Cow for error messages. #87CSSInliner::options() that implements the Builder pattern. #71
CSSInliner::options() that implements the Builder pattern. #71parser.rsget_full_urlOption to disable processing of "style" tags. #45
openssl to rustls in attohttpc dependency. #49ToString trait during error handling to avoid using a formatter.Remove debug symbols from the release build
String allocations.BTreeMap::insert when style attribute already exists### Changed - Fix links in docs
Pyo3 to 0.11. #40One column per quarter.