Package com.helger.css
Interface ICSSWriterSettings
- All Known Implementing Classes:
CSSWriterSettings
public interface ICSSWriterSettings
Settings for customizing the serialization of CSS properties etc.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckVersionRequirements(ICSSVersionAware aCSSObject) Check if the passed object matches the version requirements defined be this settings.getIndent(int nCount) Get the indentation for an arbitrary number of levels.com.helger.commons.system.ENewLineModedefault ECSSVersionDeprecated.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean
-
Method Details
-
getCSSVersion
- Returns:
- The CSS version to be used. May not be
null. - Since:
- v6.2.0
-
getVersion
Deprecated.UsegetCSSVersion()instead- Returns:
- The CSS version to be used. May not be
null.
-
isOptimizedOutput
boolean isOptimizedOutput()- Returns:
trueif all unnecessary whitespaces should be ignored when writing.
-
isRemoveUnnecessaryCode
boolean isRemoveUnnecessaryCode()- Returns:
trueif all unnecessary elements (like empty style declarations) should be removed. This will than potentially lead to CSS that is not equal to the original CSS!
-
getNewLineMode
- Returns:
- The new line mode to be used for emitting the file. By default the Unix new line mode ("\n") is used.
-
getNewLineString
- Returns:
- The string underlying the new line mode
- See Also:
-
getIndent
Get the indentation for an arbitrary number of levels. This can be used to customize the indentation strategy like using tabs or spaces, how many spaces etc.- Parameters:
nCount- The number of indentations desired. Always ≥ 0.- Returns:
- The string to be used for indentation. May not be
nullbut may be empty.
-
isQuoteURLs
boolean isQuoteURLs()- Returns:
trueif all URL values should be quoted,falseif URL quoting should only be applied if absolutely necessary.
-
isWriteNamespaceRules
boolean isWriteNamespaceRules()- Returns:
trueif @namespace rules should be written,falseif not
-
isWriteFontFaceRules
boolean isWriteFontFaceRules()- Returns:
trueif @font-face rules should be written,falseif not
-
isWriteKeyframesRules
boolean isWriteKeyframesRules()- Returns:
trueif @keyframes rules should be written,falseif not
-
isWriteMediaRules
boolean isWriteMediaRules()- Returns:
trueif @media rules should be written,falseif not
-
isWritePageRules
boolean isWritePageRules()- Returns:
trueif @page rules should be written,falseif not
-
isWriteViewportRules
boolean isWriteViewportRules()- Returns:
trueif @viewport rules should be written,falseif not
-
isWriteSupportsRules
boolean isWriteSupportsRules()- Returns:
trueif @supports rules should be written,falseif not
-
isWriteUnknownRules
boolean isWriteUnknownRules()- Returns:
trueif unknown @ rules should be written,falseif not
-
checkVersionRequirements
Check if the passed object matches the version requirements defined be this settings.- Parameters:
aCSSObject- The object to be checked.- Throws:
IllegalStateException- In case the version does not match- See Also:
-
getCSSVersion()instead