com.vaadin.sass.internal.visitor
Class ExtendNodeHandler
java.lang.Object
com.vaadin.sass.internal.visitor.ExtendNodeHandler
public class ExtendNodeHandler
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendNodeHandler
public ExtendNodeHandler()
traverse
public static void traverse(ExtendNode node)
throws Exception
- Throws:
Exception
clear
public static void clear()
modifyTree
public static void modifyTree(Node node)
throws Exception
- Throws:
Exception
createSelectorsForExtensions
public static SelectorSet createSelectorsForExtensions(Selector target,
Set<com.vaadin.sass.internal.visitor.ExtendNodeHandler.Extension> extendsMap)
- Try to unify argument selector with each selector specified in an
extend-clause. For each match found, add the enclosing block's selectors
with substitutions (see examples below). Finally eliminates redundant
selectors (a selector is redundant in a set if subsumed by another
selector in the set).
.a {...}; .b { @extend .a } ---> .b
.a.b {...}; .c { @extend .a } ---> .b.c
.a.b {...}; .c .c { @extend .a } ---> .c .b.c
- Parameters:
target - the selector to matchextendsMap - mapping from the simple selector sequence of the
extend-selector to an extending selector
- Returns:
- the generated selectors (may contain duplicates)
Copyright © 2013–2014 Vaadin. All rights reserved.