There may be an easier way, but you could have a worker to add a Mixin
/ Component to each page which has no markup, but @Import's your CSS.

In T5.3 it's :

public class EmbedCssMixinInEveryPageWorker implements
ComponentClassTransformWorker2 {
        public void transform(PlasticClass plasticClass,
TransformationSupport support, MutableComponentModel model) {
                if (model.isPage())
                        model.addMixinClassName(CssMixin.class.getName());
        }
}

@Import(stylesheet="context:myApp.css")
public class CssMixin {
}

in your module, add

public static void
contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker2>
configuration) {
        configuration.addInstance("CssMixin", 
EmbedCssMixinInEveryPageWorker.class);
}

Steve.

On 29 September 2011 00:24, Wechsung, Wulf <wulf.wechs...@sap.com> wrote:
> Hello Guys,
>
> I was wondering if it is at all possible to add a global (ie included in all 
> pages) CSS from a module. Basically just like the tapestry framework  adds 
> the default.css to any page in your tapestry web app I would like to have a 
> webapp that loads a module that includes a CSS in all the pages of the app. 
> The use-case is that I need to add some CSS fixes that should go into all 
> apps that use the module auto-magically as is the case with filters and 
> services.
>
> Thanks and kind Regards,
> Wulf
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to