I am currently developing a custom JSF component that displays content in multiple columns in a "responsive" manner.
This component utilizes the "CSS Multi-column Layout Module" (http://www.w3.org/TR/css3-multicol/) (tutorial available in French: ).
Below is the current solution that I have implemented, which is functional:
Component class:
/* Component class code goes here */
Renderer class:
/* Renderer class code goes here */
Component declaration in taglib:
/* Taglib component declaration code goes here */
Stylesheet:
/* Stylesheet code for responsive columns */
I am looking for a way to dynamically generate and include data such as the number of columns to use at different resolutions. One approach I am considering is generating a dynamic stylesheet fragment and including it.
The base dynamic stylesheet would have a structure like this:
/* Dynamic stylesheet code for variable column count */
How can I dynamically process and include this dynamic stylesheet fragment?
I foresee an issue where the same stylesheet might be used multiple times with different parameters. If there was only one usage, including EL expressions in the stylesheet could work. However, I am exploring other solutions to this problem.
One alternative could be to append styles just before the component, but I am hesitant about this approach.