Skip to content

Commit 357657f

Browse files
authored
Merge PR #123 from kaj/css-selectors
Separate css selectors from sass selectors
2 parents 87960e3 + a4c6d16 commit 357657f

26 files changed

+818
-295
lines changed

Diff for: CHANGELOG.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ project adheres to
1717
contains a `SourcePos` for where it is declared.
1818
* The fields of `SourcePos` is now private.
1919
* The `name` of a `sass::Item::AtRule` is now a SassString.
20-
* PR #118: A `css::Value::Literal` now contains a `CssString` rather
21-
than a `String` and a `Quotes`. Evaluating a `SassString` also
22-
returns a `CssString`.
20+
* A `css::Value::Literal` now contains a `CssString` rather than a
21+
`String` and a `Quotes`. Evaluating a `SassString` also returns a
22+
`CssString` (PR #118).
23+
* The selector types are split from one `selector` module to the `css`
24+
and `sass` modules. Anything that used `selector` types should now
25+
use either `css` or `sass` types (PR #123).
2326

2427
### Improvements
2528

@@ -31,6 +34,9 @@ project adheres to
3134
* Fixed #116: The `sass:map.merge` function was buggy.
3235
* Fixed #119: `saturate(200%)` is allowed (the argument is not limited
3336
to 0..100%).
37+
* `sass:selector` functions `append`, `nest`, and `parse` are closer
38+
to correct (PR #123).
39+
* Css strings and selectors can now be parsed directly (PR #123).
3440
* Fixed reformatting of to-much-indented comments.
3541
* Unicode Private-use characters are escaped when printed.
3642
* Updated `nom` to 7.0 and `nom-locate` to 4.0.

Diff for: src/css/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
//! Types for css values and rules.
22
mod call_args;
33
mod rule;
4+
mod selectors;
45
mod string;
6+
mod util;
57
mod value;
68
mod valueformat;
79

810
pub use self::call_args::CallArgs;
911
pub use self::rule::{BodyItem, Rule};
12+
pub use self::selectors::{BadSelector, Selector, SelectorPart, Selectors};
1013
pub use self::string::CssString;
1114
pub use self::value::{Value, ValueMap};
15+
16+
pub(crate) use self::util::is_not;

Diff for: src/css/rule.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use super::{CssString, Value};
2-
use crate::selectors::Selectors;
1+
use super::{CssString, Selectors, Value};
32

43
/// A css rule.
54
///

0 commit comments

Comments
 (0)