critters-rs

Crates.iocritters-rs
lib.rscritters-rs
version0.1.0
sourcesrc
created_at2024-10-10 02:17:42.364964
updated_at2024-10-10 02:17:42.364964
descriptionQuickly inline your website's critical CSS.
homepagehttps://github.com/michaelhthomas/critters-rs
repositoryhttps://github.com/michaelhthomas/critters-rs
max_upload_size
id1403363
size92,929
Michael Thomas (michaelhthomas)

documentation

README

critters_rs

Rapidly inline your site's critical CSS.

Features

  • Extremely fast -- written in pure Rust for maximal performance
  • Robust -- uses HTML and CSS parsers from the Servo project
  • Integrations with popular frameworks
  • Supports preloading and/or inlining critical fonts
  • Prunes unused CSS keyframes and media queries
  • Minifies CSS using Parcel's lightningcss
  • Supports pruning inlined CSS rules from lazy-loaded stylesheets

Usage

CLI

First, install the critters cli command globally:

cargo install critters-rs

Then, execute critters on a folder with your preferred options,

critters -p ./dist {options}

or view all the possible options:

critters -h

NodeJS API

See the documentation in the package's README.

Rust Crate

View the documentation for the Rust crate at https://docs.rs/critters-rs/.

Other Integrations

View the documentation for other integrations in their package READMEs:

License

Apache 2.0

Commit count: 43

cargo fmt