Class PassUtil

java.lang.Object
com.google.common.css.compiler.passes.PassUtil

public class PassUtil extends Object
Utility methods that can be useful for compiler passes.
  • Field Details

    • ALTERNATE

      public static final String ALTERNATE
      Annotation to explicitly state that several consecutive declarations are alternatives and it should be left up to the user agent to interpret whichever is appropriate. The annotation excludes the declarations from being treated as redundant.
      See Also:
  • Method Details

    • printSelector

      public static String printSelector(CssSelectorNode selector)
      Prints a selector including the combinators and refiners but without a block behind with the compact printer.
    • printSelectorList

      public static String printSelectorList(CssSelectorListNode selectorList)
      Prints a list of selector including the combinators and refiners but without a block behind with the compact printer.
    • prettyPrintSelector

      public static String prettyPrintSelector(CssSelectorNode selector)
      Prints a selector including the combinators and refiners but without a block behind with the pretty printer.
    • hasAlternateAnnotation

      public static boolean hasAlternateAnnotation(CssNode node)
      Returns whether the ALTERNATE comment has been found among the comments of the node.