Package de.xima.fc.common.utils
Class XCssUtils
- java.lang.Object
-
- de.xima.fc.common.utils.XCssUtils
-
public class XCssUtils extends Object
Utility class for CSS files.- Since:
- 8.3.0
- Author:
- XIMA Media GmbH
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.helger.css.decl.CascadingStyleSheetparseCssOrEmpty(String cssContent, String fileName)Parses as much of a CSS stylesheet as possible, or returns an empty stylesheet if it cannot be parsed.static com.helger.css.decl.CascadingStyleSheetparseCssOrNull(String cssContent, String fileName)Parses an entire CSS stylesheet, if possible, or returns null if any part cannot be parsed.
-
-
-
Method Detail
-
parseCssOrEmpty
public static com.helger.css.decl.CascadingStyleSheet parseCssOrEmpty(String cssContent, String fileName)
Parses as much of a CSS stylesheet as possible, or returns an empty stylesheet if it cannot be parsed.- Parameters:
cssContent- The CSS content to parse.fileName- The name of the file, e.g. to use in error messages.- Returns:
- The parsed CSS stylesheet or empty if it could not be parsed.
-
parseCssOrNull
public static com.helger.css.decl.CascadingStyleSheet parseCssOrNull(String cssContent, String fileName)
Parses an entire CSS stylesheet, if possible, or returns null if any part cannot be parsed.- Parameters:
cssContent- The CSS content to parse.fileName- The name of the file, e.g. to use in error messages.- Returns:
- The parsed CSS stylesheet or null if it could not be parsed.
-
-