Skip to content

Commit

Permalink
Add support for css empty namespace attribute selector (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeweb authored Nov 24, 2021
1 parent da67438 commit 926781b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Fix a bug where calculations with different operators were incorrectly
considered equal.

* Properly parse attribute selectors with empty namespaces.

### JS API

* Print more detailed JS stack traces. This is mostly useful for the Sass team's
Expand Down
4 changes: 4 additions & 0 deletions lib/src/parse/selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ class SelectorParser extends Parser {
return QualifiedName(identifier(), namespace: "*");
}

if (scanner.scanChar($pipe)) {
return QualifiedName(identifier(), namespace: "");
}

var nameOrNamespace = identifier();
if (scanner.peekChar() != $pipe || scanner.peekChar(1) == $equal) {
return QualifiedName(nameOrNamespace);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.43.5-dev
version: 1.43.5
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit 926781b

Please sign in to comment.