java.lang.Object
io.sf.carte.doc.style.css.impl.CSSUtil
Utility methods related to CSS.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisEnvLengthName(String name) static booleanisInvalidCSSContentType(URL url, String conType) Check whether the given content-type is invalid for the provided URL pointing to a style sheet.static booleanisUnimplementedImageFunction(String lcfName) Check whether the given function name is a proposed image function that was not yet implemented in browsers at the time of last revision.static booleanIs the given string a valid CSS identifier?static booleanIs the given string a valid CSS pseudo-element/class name?static CSSValueSyntax.MatchmatchEnv(CSSValueSyntax rootSyntax, CSSValueSyntax syntax, String name, LexicalUnit fallback) Match an environment variable.
-
Constructor Details
-
CSSUtil
public CSSUtil()
-
-
Method Details
-
isValidIdentifier
Is the given string a valid CSS identifier?- Parameters:
s- the non-empty identifier to test; cannot contain hex escapes.- Returns:
- true if is a valid identifier.
-
isValidPseudoName
Is the given string a valid CSS pseudo-element/class name?- Parameters:
s- the non-empty name to test; cannot contain escapes.- Returns:
- true if is a valid name.
-
isInvalidCSSContentType
Check whether the given content-type is invalid for the provided URL pointing to a style sheet.- Parameters:
url- the URL.conType- the content-type.- Returns:
trueif the content-type is invalid for a CSS style sheet.
-
isUnimplementedImageFunction
Check whether the given function name is a proposed image function that was not yet implemented in browsers at the time of last revision.This method helps the library in processing image functions that had not been implemented by browsers when it was released.
- Parameters:
lcfName- the lower-case name of the function.- Returns:
trueif the name is an unimplemented proposed image function.
-
matchEnv
public static CSSValueSyntax.Match matchEnv(CSSValueSyntax rootSyntax, CSSValueSyntax syntax, String name, LexicalUnit fallback) Match an environment variable. -
isEnvLengthName
-