I would like to dynamically change style specifications in the “HEAD-section” - especially for @media print.
My solution is based on the following basic specification, here as an example (“ipsum” turns red)
{{velocity}}
#set ($discard=$xwiki.linkx.use("data:text/css, .democlass {background-color:orange}",{'type': 'text/css', 'rel': 'stylesheet'}))
{{/velocity}}
Lorem (% class="democlass" %) ipsum (%%) dolor sit
In this procedure, I can dynamically create the specification behind “data:” within a macro.
I want to avoid creating or changing a large number of XWiki.StyleSheetExtension objects.
Comments, especially suggestions for improvement are very welcome.
Norbert