mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 05:41:14 +01:00
Stringify the parent selector normally.
This commit is contained in:
parent
64e4954656
commit
55e81951b2
@ -15,6 +15,4 @@ class ParentSelector extends SimpleSelector {
|
|||||||
|
|
||||||
List<SimpleSelector> unify(List<SimpleSelector> compound) =>
|
List<SimpleSelector> unify(List<SimpleSelector> compound) =>
|
||||||
throw new UnsupportedError("& doesn't support unification.");
|
throw new UnsupportedError("& doesn't support unification.");
|
||||||
|
|
||||||
String toString() => "&${suffix ?? ''}";
|
|
||||||
}
|
}
|
||||||
|
@ -315,8 +315,10 @@ class _SerializeCssVisitor extends CssVisitor {
|
|||||||
(complex) => visitComplexSelector(complex));
|
(complex) => visitComplexSelector(complex));
|
||||||
}
|
}
|
||||||
|
|
||||||
void visitParentSelector(ParentSelector parent) =>
|
void visitParentSelector(ParentSelector parent) {
|
||||||
throw new UnsupportedError("$parent cannot be converted to CSS.");
|
_buffer.writeCharCode($and);
|
||||||
|
if (parent.suffix != null) _buffer.write(parent.suffix);
|
||||||
|
}
|
||||||
|
|
||||||
void visitPseudoSelector(PseudoSelector pseudo) {
|
void visitPseudoSelector(PseudoSelector pseudo) {
|
||||||
_buffer.writeCharCode($colon);
|
_buffer.writeCharCode($colon);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user