Class CssPropertyNode

All Implemented Interfaces:
Locatable

public class CssPropertyNode extends CssValueNode
A node representing a CSS property, such as background or padding.
  • Constructor Details

    • CssPropertyNode

      public CssPropertyNode(String value)
      Creates a property node with the specified value.
    • CssPropertyNode

      public CssPropertyNode(String value, @Nullable SourceCodeLocation sourceCodeLocation)
      Creates a property node with the specified value and source code location.
    • CssPropertyNode

      public CssPropertyNode(CssPropertyNode node)
      Creates a property node by deep-copying the specified property node.
  • Method Details

    • deepCopy

      public CssPropertyNode deepCopy()
      Specified by:
      deepCopy in class CssValueNode
    • getProperty

      public Property getProperty()
    • getPropertyName

      public String getPropertyName()
    • isCustom

      public boolean isCustom()
      Returns:
      whether this is a CSS custom property.
    • getPartition

      public String getPartition()
      Gets the partition of this property. All properties with the same partition share a common shorthand. A non-standard property is its own single partition.

      For example, padding, padding-bottom, padding-left, padding-right, padding-top are all in the padding partition. As another example, z-index is its own single partition.

      Returns:
      a string representing the partition
    • toString

      public String toString()
      Description copied from class: CssValueNode
      Use for debugging only.
      Overrides:
      toString in class CssValueNode
      See Also: