diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bdc0e2..624e48f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ # 0.9.1 +This release is largely focused on `@extend`, but it also resolves some regressions resulting from the new parser. + - **Implement `@extend`** + - properly document new API - fix regression in which `@at-root` would panic when placed after a ruleset - fix regression related to `@mixin` and `@function` scoping when combined with outer, local variables + - remove most remaining `unwrap`s that could result in a panic # 0.9.0 diff --git a/Cargo.toml b/Cargo.toml index 405c2ed..aa831b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "grass" version = "0.9.0" -description = "SASS compiler" +description = "A near-feature-complete Sass compiler written purely in Rust" readme = "README.md" license = "MIT" categories = ["command-line-utilities", "web-programming"] @@ -20,7 +20,7 @@ required-features = ["commandline"] [lib] name = "grass" path = "src/lib.rs" -# crate-type = ["cdylib", "rlib"] +crate-type = ["cdylib", "rlib"] bench = false [[bench]] diff --git a/README.md b/README.md index b90f390..64c58c1 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # grass -This crate aims to provide a high level interface for compiling SASS into -plain CSS. It offers a very limited API, currently exposing only 2 structs. +This crate aims to provide a high level interface for compiling Sass into +plain CSS. It offers a very limited API, currently exposing only 2 functions. In addition to a library, also included is a binary that is intended to act as an invisible -replacement to the sass commandline executable. +replacement to the Sass commandline executable. -This crate aims to achieve complete feature parity with the dart-sass reference -implementation. A deviation from the dart-sass implementation can be considered +This crate aims to achieve complete feature parity with the `dart-sass` reference +implementation. A deviation from the `dart-sass` implementation can be considered a bug except for in the following situations: - Error messages @@ -32,13 +32,11 @@ The large features remaining are ``` builtin functions min, max -@extend (~600 tests) indented syntax (27 tests) css imports -@use and module system (~1200 tests) -@forward (~400 tests) +@use, @forward, and the module system (~1000 tests) @keyframes (~30 tests) -@supports (~128 tests) +@supports (~100 tests) ``` ## Features @@ -71,7 +69,14 @@ cargo b --release ./sass-spec/sass-spec.rb -c './target/release/grass' ``` -These numbers come from a default run of the sass specification as shown above. +These numbers come from a default run of the Sass specification as shown above. + +``` +2020-06-20 +PASSING: 2750 +FAILING: 2343 +TOTAL: 5093 +``` ``` 2020-06-16 diff --git a/src/atrule/kind.rs b/src/atrule/kind.rs index 0d30411..11d64f7 100644 --- a/src/atrule/kind.rs +++ b/src/atrule/kind.rs @@ -6,7 +6,7 @@ use crate::error::SassError; #[derive(Clone, Debug, Eq, PartialEq)] pub enum AtRuleKind { - // SASS specific @rules + // Sass specific @rules /// Loads mixins, functions, and variables from other Sass /// stylesheets, and combines CSS from multiple stylesheets together Use, diff --git a/src/color/mod.rs b/src/color/mod.rs index aa9a1ac..fbefd0e 100644 --- a/src/color/mod.rs +++ b/src/color/mod.rs @@ -1,6 +1,6 @@ //! A color is internally represented as either RGBA or HSLA. //! -//! Colors can be constructed in SASS through names (e.g. red, blue, aqua) +//! Colors can be constructed in Sass through names (e.g. red, blue, aqua) //! or the builtin functions `rgb()`, `rgba()`, `hsl()`, and `hsla()`, //! all of which can accept 1-4 arguments. //! diff --git a/src/error.rs b/src/error.rs index 47b7f54..b05632c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -120,6 +120,6 @@ impl From<(String, Span)> for SassError { impl Error for SassError { #[inline] fn description(&self) -> &'static str { - "SASS parsing error" + "Sass parsing error" } } diff --git a/src/lib.rs b/src/lib.rs index 82076ff..bcc1b7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,5 @@ /*! # grass -An implementation of the sass specification in pure rust. - -All functionality is currently exposed through [`StyleSheet`]. +An implementation of the Sass specification in pure rust. Spec progress as of 2020-05-01: diff --git a/src/value/sass_function.rs b/src/value/sass_function.rs index a60d821..1dfc87b 100644 --- a/src/value/sass_function.rs +++ b/src/value/sass_function.rs @@ -1,8 +1,8 @@ -//! SASS functions are those that are evaluated and return a value +//! Sass functions are those that are evaluated and return a value //! -//! SASS functions can be either user-defined or builtin. +//! Sass functions can be either user-defined or builtin. //! -//! User-defined functions are those that have been implemented in SASS +//! User-defined functions are those that have been implemented in Sass //! using the @function rule. See the documentation of `crate::atrule::Function` //! for more information. //! @@ -16,7 +16,7 @@ use crate::{ parse::Parser, value::Value, }; -/// A SASS function +/// A Sass function /// /// See toplevel documentation for more information ///