Skip to content

Commit aa52cf1

Browse files
authored
Always add quotes to attribute selector values that begin with -- (#529)
Closes #527
1 parent d4adea7 commit aa52cf1

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.15.1
2+
3+
* Always add quotes to attribute selector values that begin with `--`, since IE
4+
11 doesn't consider them to be identifiers.
5+
16
## 1.15.0
27

38
* Add support for passing arguments to `@content` blocks. See [the

lib/src/visitor/serialize.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,9 +1154,12 @@ class _SerializeVisitor implements CssVisitor, ValueVisitor, SelectorVisitor {
11541154
}
11551155

11561156
/// Returns whether [text] is a valid identifier.
1157+
///
1158+
/// This *doesn't* consider identifiers beginning with `--` to be valid,
1159+
/// because IE 11 doesn't.
11571160
bool _isIdentifier(String text) {
11581161
var scanner = StringScanner(text);
1159-
while (scanner.scanChar($dash)) {}
1162+
scanner.scanChar($dash);
11601163

11611164
if (scanner.isDone) return false;
11621165
var first = scanner.readChar();

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.15.0
2+
version: 1.15.1
33
description: A Sass implementation in Dart.
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/sass/dart-sass

0 commit comments

Comments
 (0)