if (logger.isDebugEnabled()) {
logger.debug("Inline css: " + css);
}
// Create a style sheet compiler.
CSSCompilerBuilder builder = new CSSCompilerBuilder();
builder.setProject(pageContext.getCurrentProject());
builder.setBaseURL(pageContext.getBaseURL());
builder.setStyleSheetCompilerFactory(
ThemeStyleSheetCompilerFactory.getDefaultInstance());
builder.setParserMode(CSSParserMode.LAX);
CSSCompiler cssCompiler = builder.getCSSCompiler();
// Parse and then compile the css into compiled style sheet.
CompiledStyleSheet compiledStyleSheet =
cssCompiler.compile(new StringReader(css), null);