mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
Fix some pseudo bugs.
This commit is contained in:
parent
0a0f7837b0
commit
64e4954656
@ -280,6 +280,7 @@ class Parser {
|
||||
var couldBeSelector =
|
||||
postColonWhitespace.isEmpty && _lookingAtInterpolatedIdentifier();
|
||||
|
||||
var beforeDeclaration = _scanner.state;
|
||||
Expression value;
|
||||
try {
|
||||
value = _declarationExpression();
|
||||
@ -298,6 +299,7 @@ class Parser {
|
||||
|
||||
// If the value would be followed by a semicolon, it's definitely supposed
|
||||
// to be a property, not a selector.
|
||||
_scanner.state = beforeDeclaration;
|
||||
var additional = _almostAnyValue();
|
||||
if (_scanner.peekChar() == $semicolon) rethrow;
|
||||
|
||||
|
@ -319,8 +319,8 @@ class _SerializeCssVisitor extends CssVisitor {
|
||||
throw new UnsupportedError("$parent cannot be converted to CSS.");
|
||||
|
||||
void visitPseudoSelector(PseudoSelector pseudo) {
|
||||
_buffer.write($colon);
|
||||
if (pseudo.type == PseudoType.element) _buffer.write($colon);
|
||||
_buffer.writeCharCode($colon);
|
||||
if (pseudo.type == PseudoType.element) _buffer.writeCharCode($colon);
|
||||
_buffer.write(pseudo.name);
|
||||
if (pseudo.argument == null && pseudo.selector == null) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user