|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tinyjee.maven.dim.extensions.AbstractParameterTransformer
org.tinyjee.maven.dim.extensions.InlineCssParameterTransformer
public class InlineCssParameterTransformer
This extension adds an inline CSS definition to the current page. Use this extension to define short-lived style classes or adjust existing styles for just one page.
Field Summary | |
---|---|
static String |
PARAM_INLINE_CSS
Enables this extension and sets the content to place inside the inlined "<style>" element. |
Fields inherited from interface org.tinyjee.maven.dim.spi.RequestParameterTransformer |
---|
TRANSFORMERS |
Constructor Summary | |
---|---|
InlineCssParameterTransformer()
|
Method Summary | |
---|---|
protected boolean |
doTransformParameters(Map<String,Object> requestParams)
|
Methods inherited from class org.tinyjee.maven.dim.extensions.AbstractParameterTransformer |
---|
isSourceSet, transformParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAM_INLINE_CSS
Note: Setting this property has no effect in case of "source
" or "source-class
" were
specified with the macro call. This behaviour ensures that the parameter "inline-css
" can still be used
with ordinary macro calls where a source or source-class was set.
Using this parameter has no effect when the used Sink does not support HTML markup.
This parameter supports the usage of "classpath:/path/to/css/to/inline
" to load the css from the classpath instead
of defining it with the macro call.
As the default brace style of "{}" is used to call macros in APT, the extension supports substituting the default CSS braces with "[]". This brace style is optional but it must be used when more than one style class is defined with the macro call as the APT parser swallows the "}" character, leading to invalid results.
Examples:
%{include|inline-css=.my-class { background-color:red; }}
"%{include|inline-css=.section th { background-color:#999999; color:white; }}
"
- changes the appearance of table headers inside sections.%{include|inline-css=.white [ color:white; ] .red [ color:red; ]}
"
- Define more than one class at once using [] instead of {}.
Constructor Detail |
---|
public InlineCssParameterTransformer()
Method Detail |
---|
protected boolean doTransformParameters(Map<String,Object> requestParams)
doTransformParameters
in class AbstractParameterTransformer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |