Ah, here's what went wrong: in the onInit() of the BorderPage, I had the
line getPageImports().add( new CssImport(...) ). It works, but has a
side effect on the order of the import. When I override
getHeadElements() it works fine: my css imports come last now.

Cheers,

WarnerJan



On Fri, 2009-06-26 at 12:04 +0200, Bob Schellink wrote:
> Hi WarnerJan,
> 
> On 6/26/09, WarnerJan Veldhuis <[email protected]> wrote:
> >
> > I want to override some styles of click.css, but not ALL of them.
> > Problem here is that the click.css import comes last in the imports, so
> > there is no way to override a single click-generated-style.
> >
> > Alternatively I can copy the existing click.css and supply my own
> > click.css, but I was wondering if I had any influence over the order of
> > CSS import lines.
> 
> 
> The order of the imports are the same order in which controls are
> added to the Page.
> 
> So if you have:
> 
>   addControl(form);
>   addControl(table);
> 
> the form imports will come before the table imports.
> 
> However Pages can have import statements too, which is included after
> the control imports.
> 
> So you could have:
> 
>   pubilc MyPage extends Page {
>     public void onInit() {
>       addControl(form);
>     }
> 
>     public String getHtmlImports() {
>       return "<style rel='stylesheet' type='text/css' href='/my-page.css'/>";
>     }
>   }
> 
> kind regards
> 
> bob

Reply via email to