-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate css selectors from sass selectors #123
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kaj
force-pushed
the
css-selectors
branch
13 times, most recently
from
October 9, 2021 22:12
c0709c9
to
83d8769
Compare
When parsing a scss document, we get `sass::Selectors`, which may contain interpolation. When evaluating those we get `css::Selectors`. Here's hoping that working with css selectors, without the possibility of interpolation, will make implementing selector functions easier.
Mainly make error checking more compliant with what the test suite expects. Also some refactoring of argument checking in other functions.
Move css::parser module to parser::css.
kaj
force-pushed
the
css-selectors
branch
9 times, most recently
from
October 10, 2021 21:56
c7b16bb
to
4f63e5f
Compare
kaj
added a commit
that referenced
this pull request
Dec 10, 2021
Released 2021-12-10. Progress: 3849 of 6444 tests passed in dart-sass compatibility mode (this may seem like a regression, but that is caused by changed in the test suite). ### Breaking changes * `Error` has a new alternative, `AtError`. * In `sass::Item`, the `Error`, `MixinCall` and `MixinDeclaration` variants is changed to include a `SourcePos`. Also, a `sass::Mixin` contains a `SourcePos` for where it is declared. * The fields of `SourcePos` is now private. * The `name` of a `sass::Item::AtRule` is now a SassString. * A `css::Value::Literal` now contains a `CssString` rather than a `String` and a `Quotes`. Evaluating a `SassString` also returns a `CssString` (PR #118). * The selector types are split from one `selector` module to the `css` and `sass` modules. Anything that used `selector` types should now use either `css` or `sass` types (PR #123). ### Improvements * A css call is just a special kind of string. * Include position of directive or function call when reporting `@error` errors. * Improve error reporting from inside mixins and functions. * Support interpolation in `@`-rule names. * Fixed #116: The `sass:map.merge` function was buggy. * Fixed #119: `saturate(200%)` is allowed (the argument is not limited to 0..100%). * `sass:selector` functions `append`, `nest`, and `parse` are closer to correct (PR #123). * `sass:meta` functions `calc-args` and `calc-name` implemented (PR #126). * Css strings and selectors can now be parsed directly (PR #123). * Fixed reformatting of to-much-indented comments. * Fixed panics in some color arithmetic (Issue #120, #121, #122, PR #125). * Replace rand with fastrand, hopefully compile faster (PR #105). * Unicode Private-use characters are escaped when printed. * Updated `nom` to 7.0 and `nom-locate` to 4.0. * Update sass-spec test suite to 2021-11-30. Thanks to @paolobarbolini, @connorskees and @charlesxsh for reporting issues.
kaj
added a commit
that referenced
this pull request
Dec 10, 2021
Released 2021-12-10. Progress: 3849 of 6444 tests passed in dart-sass compatibility mode (this may seem like a regression, but that is caused by changed in the test suite). * `Error` has a new alternative, `AtError`. * In `sass::Item`, the `Error`, `MixinCall` and `MixinDeclaration` variants is changed to include a `SourcePos`. Also, a `sass::Mixin` contains a `SourcePos` for where it is declared. * The fields of `SourcePos` is now private. * The `name` of a `sass::Item::AtRule` is now a SassString. * A `css::Value::Literal` now contains a `CssString` rather than a `String` and a `Quotes`. Evaluating a `SassString` also returns a `CssString` (PR #118). * The selector types are split from one `selector` module to the `css` and `sass` modules. Anything that used `selector` types should now use either `css` or `sass` types (PR #123). * A css call is just a special kind of string. * Include position of directive or function call when reporting `@error` errors. * Improve error reporting from inside mixins and functions. * Support interpolation in `@`-rule names. * Fixed #116: The `sass:map.merge` function was buggy. * Fixed #119: `saturate(200%)` is allowed (the argument is not limited to 0..100%). * `sass:selector` functions `append`, `nest`, and `parse` are closer to correct (PR #123). * `sass:meta` functions `calc-args` and `calc-name` implemented (PR #126). * Css strings and selectors can now be parsed directly (PR #123). * Fixed reformatting of to-much-indented comments. * Fixed panics in some color arithmetic (Issue #120, #121, #122, PR #125). * Replace rand with fastrand, hopefully compile faster (PR #105). * Unicode Private-use characters are escaped when printed. * Updated `nom` to 7.0 and `nom-locate` to 4.0. * Update sass-spec test suite to 2021-11-30. Thanks to @paolobarbolini, @connorskees and @charlesxsh for reporting issues.
kaj
added a commit
that referenced
this pull request
Mar 13, 2022
There was a regression in path handling for actual on-disk files in PR
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When parsing a scss document, we get
sass::Selectors
, which may contain interpolation. When evaluating those we getcss::Selectors
. Here's hoping that working with css selectors, without the possibility of interpolation, will make implementing selector functions easier.Improve
selector:append
,:nest
, and:parse
functions.Mainly make error checking more compliant with what the test suite expects. Also some refactoring of argument checking in other functions.