Class CssPseudoClassNode

All Implemented Interfaces:
Locatable

public class CssPseudoClassNode extends CssRefinerNode
A CssRefinerNode implementation that represents a pseudo-class. For example: :visited, :nth-child(2n)
  • Constructor Details

  • Method Details

    • deepCopy

      public CssPseudoClassNode deepCopy()
      Specified by:
      deepCopy in class CssNode
    • getFunctionType

      public CssPseudoClassNode.FunctionType getFunctionType()
    • getArgument

      public String getArgument()
    • setArgument

      public void setArgument(String argument)
    • getNotSelector

      public CssSelectorNode getNotSelector()
    • getSpecificity

      public CssSelectorNode.Specificity getSpecificity()
      Returns the specificity of this pseudo-class or an old pseudo-element starting with a single colon.

      The :: notation for pseudo-elements is introduced in CSS level 3 in order to establish a discrimination between pseudo-classes and pseudo-elements. "For compatibility with existing style sheets, user agents must also accept the previous one-colon notation for pseudo-elements introduced in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and :after). This compatibility is not allowed for the new pseudo-elements introduced in this specification." http://www.w3.org/TR/css3-selectors/#target-pseudo

      The negation pseudo-class itself does not influence the specificity. However, selectors inside the negation pseudo-class are counted like any other. Thus, red.level has the same specificity as *:not(red.level).

      Specified by:
      getSpecificity in class CssRefinerNode
    • toString

      public String toString()
      Description copied from class: CssNode
      This is the default implementation of toString().

      Overriding this method should only be done for debugging or logging purposes, not for the actual functionality of the compiler. If a string representation of a tree is needed, define a Visitor that builds the desired representation.

      Overrides:
      toString in class CssRefinerNode
      See Also: