Interface CSSValue

All Superinterfaces:
Cloneable
All Known Subinterfaces:
CSSAttrValue, CSSColorValue, CSSCountersValue, CSSCounterValue, CSSEnvVariableValue, CSSExpressionValue, CSSFunctionValue, CSSGradientValue, CSSLexicalValue, CSSPrimitiveValue, CSSRatioValue, CSSShorthandValue, CSSTypedValue, CSSUnicodeRangeValue, CSSUnicodeRangeValue.CSSUnicodeValue, CSSValueList<E>, CSSVarValue, HSLColorValue, HWBColorValue, LABColorValue, LCHColorValue, RGBColorValue
All Known Implementing Classes:
AttrValue, CalcValue, ColorValue, EnvVariableValue, ExpressionValue, FunctionValue, GradientValue, HSLColorValue, HWBColorValue, IdentifierValue, InheritValue, InitialValue, KeywordValue, LABColorValue, LCHColorValue, LexicalValue, LinkedCSSValueList, NumberValue, PercentageValue, PrimitiveValue, ProxyValue, RatioValue, RectValue, RevertValue, RGBColorValue, StringValue, StyleValue, SystemDefaultValue, TypedValue, UnicodeRangeValue, UnicodeValue, UnicodeWildcardValue, UnknownValue, UnsetValue, URIValue, URIValueWrapper, ValueList, VarValue

public interface CSSValue extends Cloneable
A CSS style value.
  • Method Details

    • getCssValueType

      CSSValue.CssType getCssValueType()
      Get the general category to which this value belongs.
      Returns:
      the general value type.
    • getPrimitiveType

      CSSValue.Type getPrimitiveType()
      Get the primitive type.
      Returns:
      the primitive type.
    • getCssText

      String getCssText()
      Get a parsable representation of this value.
      Returns:
      the CSS serialization of this value.
    • setCssText

      void setCssText(String cssText) throws DOMException
      Set this value according to the given parsable text.
      Parameters:
      cssText - the text value.
      Throws:
      DOMException - INVALID_MODIFICATION_ERR if the text value represents a different type or the value cannot be modified.
      INVALID_CHARACTER_ERR if an invalid character was found.
      SYNTAX_ERR if the string is invalid CSS.
    • clone

      CSSValue clone()
      Creates and returns a copy of this value.
      Returns:
      a clone of this value.
    • getMinifiedCssText

      String getMinifiedCssText(String propertyName)
      Gives a minified version of the css text of the property.

      It may be customized for the given property name.

      Parameters:
      propertyName - the property name.
      Returns:
      the minified css text.
    • writeCssText

      void writeCssText(io.sf.carte.util.SimpleWriter wri) throws IOException
      Serialize this value to a SimpleWriter.
      Parameters:
      wri - the SimpleWriter.
      Throws:
      IOException - if an error happened while writing.
    • matches

      Verify if this value matches the given grammar.

      See also: SyntaxParser.

      Parameters:
      syntax - the syntax.
      Returns:
      the matching for the syntax.