8 releases
0.13.4 | Aug 4, 2024 |
---|---|
0.13.3 | May 19, 2024 |
0.13.2 | Feb 7, 2024 |
0.13.0 | Jul 9, 2023 |
0.12.1 | Jan 8, 2023 |
#1277 in Web programming
22,045 downloads per month
Used in 62 crates
(3 directly)
1MB
23K
SLoC
grass_compiler
This crate exposes the internals of the main package, grass
. For most users, the preferred crate should be grass
, as it is more stable and has a simpler API.
This crate will see frequent breaking changes.
lib.rs
:
This crate provides functionality for compiling Sass to CSS.
This crate targets compatibility with the reference implementation in Dart. If
upgrading from the now deprecated
libsass
, one may have to modify their stylesheets. These changes will not differ
from those necessary to upgrade to dart-sass
, and in general such changes should
be quite rare.
This crate is capable of compiling Bootstrap 4 and 5, bulma and bulma-scss, Bourbon, as well as most other large Sass libraries with complete accuracy. For the vast majority of use cases there should be no perceptible differences from the reference implementation.
Use as library
fn main() -> Result<(), Box<grass::Error>> {
let css = grass::from_string(
"a { b { color: &; } }".to_owned(),
&grass::Options::default().style(grass::OutputStyle::Compressed)
)?;
assert_eq!(css, "a b{color:a b}");
Ok(())
}
Use as binary
cargo install grass
grass input.scss
Dependencies
~2.6–3.5MB
~60K SLoC