mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Get simple extension working.
This commit is contained in:
parent
69221190e7
commit
e0333b303c
@ -27,7 +27,9 @@ class ComplexSelector extends Selector {
|
||||
ComplexSelector(Iterable<ComplexSelectorComponent> components,
|
||||
{Iterable<int> lineBreaks})
|
||||
: components = new List.unmodifiable(components),
|
||||
lineBreaks = new List.unmodifiable(lineBreaks);
|
||||
lineBreaks = lineBreaks == null
|
||||
? const []
|
||||
: new List.unmodifiable(lineBreaks);
|
||||
|
||||
bool isSuperselector(ComplexSelector other) =>
|
||||
complexIsSuperselector(components, other.components);
|
||||
|
@ -14,7 +14,8 @@ class SelectorList extends Selector {
|
||||
|
||||
SelectorList(Iterable<ComplexSelector> components, {Iterable<int> lineBreaks})
|
||||
: components = new List.unmodifiable(components),
|
||||
lineBreaks = new List.unmodifiable(lineBreaks);
|
||||
lineBreaks =
|
||||
lineBreaks == null ? const [] : new List.unmodifiable(lineBreaks);
|
||||
|
||||
bool isSuperselector(SelectorList other) =>
|
||||
listIsSuperslector(components, other.components);
|
||||
|
@ -143,8 +143,9 @@ class Extender {
|
||||
for (var list in extenders) {
|
||||
for (var complex in list.components) {
|
||||
var extenderBase = complex.components.last as CompoundSelector;
|
||||
var unified = _unifyCompound(
|
||||
extenderBase.components, compoundWithoutSimple);
|
||||
var unified = compoundWithoutSimple.isEmpty
|
||||
? extenderBase
|
||||
: _unifyCompound(extenderBase.components, compoundWithoutSimple);
|
||||
if (unified == null) continue;
|
||||
|
||||
if (!changed) extended = [[compound]];
|
||||
|
Loading…
Reference in New Issue
Block a user