Class CssPropertyNode

  • All Implemented Interfaces:
    Locatable

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

      • CssPropertyNode

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

        public CssPropertyNode​(java.lang.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 Detail

      • getProperty

        public Property getProperty()
      • getPropertyName

        public java.lang.String getPropertyName()
      • isCustom

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

        public java.lang.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 java.lang.String toString()
        Description copied from class: CssValueNode
        Use for debugging only.
        Overrides:
        toString in class CssValueNode
        See Also:
        Object.toString()