tidy documentation

standardize capitalization of "Sass" and make updates to reflect new
0.9.0 API
This commit is contained in:
ConnorSkees 2020-06-20 06:31:43 -04:00
parent 9a5c4d0816
commit 2887016ceb
8 changed files with 29 additions and 22 deletions

View File

@ -1,7 +1,11 @@
# 0.9.1 # 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 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 - 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 # 0.9.0

View File

@ -1,7 +1,7 @@
[package] [package]
name = "grass" name = "grass"
version = "0.9.0" version = "0.9.0"
description = "SASS compiler" description = "A near-feature-complete Sass compiler written purely in Rust"
readme = "README.md" readme = "README.md"
license = "MIT" license = "MIT"
categories = ["command-line-utilities", "web-programming"] categories = ["command-line-utilities", "web-programming"]
@ -20,7 +20,7 @@ required-features = ["commandline"]
[lib] [lib]
name = "grass" name = "grass"
path = "src/lib.rs" path = "src/lib.rs"
# crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
bench = false bench = false
[[bench]] [[bench]]

View File

@ -1,13 +1,13 @@
# grass # grass
This crate aims to provide a high level interface for compiling SASS into 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. 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 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 This crate aims to achieve complete feature parity with the `dart-sass` reference
implementation. A deviation from the dart-sass implementation can be considered implementation. A deviation from the `dart-sass` implementation can be considered
a bug except for in the following situations: a bug except for in the following situations:
- Error messages - Error messages
@ -32,13 +32,11 @@ The large features remaining are
``` ```
builtin functions min, max builtin functions min, max
@extend (~600 tests)
indented syntax (27 tests) indented syntax (27 tests)
css imports css imports
@use and module system (~1200 tests) @use, @forward, and the module system (~1000 tests)
@forward (~400 tests)
@keyframes (~30 tests) @keyframes (~30 tests)
@supports (~128 tests) @supports (~100 tests)
``` ```
## Features ## Features
@ -71,7 +69,14 @@ cargo b --release
./sass-spec/sass-spec.rb -c './target/release/grass' ./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 2020-06-16

View File

@ -6,7 +6,7 @@ use crate::error::SassError;
#[derive(Clone, Debug, Eq, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
pub enum AtRuleKind { pub enum AtRuleKind {
// SASS specific @rules // Sass specific @rules
/// Loads mixins, functions, and variables from other Sass /// Loads mixins, functions, and variables from other Sass
/// stylesheets, and combines CSS from multiple stylesheets together /// stylesheets, and combines CSS from multiple stylesheets together
Use, Use,

View File

@ -1,6 +1,6 @@
//! A color is internally represented as either RGBA or HSLA. //! 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()`, //! or the builtin functions `rgb()`, `rgba()`, `hsl()`, and `hsla()`,
//! all of which can accept 1-4 arguments. //! all of which can accept 1-4 arguments.
//! //!

View File

@ -120,6 +120,6 @@ impl From<(String, Span)> for SassError {
impl Error for SassError { impl Error for SassError {
#[inline] #[inline]
fn description(&self) -> &'static str { fn description(&self) -> &'static str {
"SASS parsing error" "Sass parsing error"
} }
} }

View File

@ -1,7 +1,5 @@
/*! # grass /*! # grass
An implementation of the sass specification in pure rust. An implementation of the Sass specification in pure rust.
All functionality is currently exposed through [`StyleSheet`].
Spec progress as of 2020-05-01: Spec progress as of 2020-05-01:

View File

@ -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` //! using the @function rule. See the documentation of `crate::atrule::Function`
//! for more information. //! for more information.
//! //!
@ -16,7 +16,7 @@ use crate::{
parse::Parser, value::Value, parse::Parser, value::Value,
}; };
/// A SASS function /// A Sass function
/// ///
/// See toplevel documentation for more information /// See toplevel documentation for more information
/// ///