com.vaadin.sass.internal.visitor
Class ExtendNodeHandler

java.lang.Object
  extended by com.vaadin.sass.internal.visitor.ExtendNodeHandler

public class ExtendNodeHandler
extends Object


Constructor Summary
ExtendNodeHandler()
           
 
Method Summary
static void clear()
           
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.
static void modifyTree(Node node)
           
static void traverse(ExtendNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendNodeHandler

public ExtendNodeHandler()
Method Detail

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 match
extendsMap - 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.