You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Sebastien <se...@gmail.com> on 2015/12/17 16:43:52 UTC

CSS header contribution overlap

Hi devs,

There is an overlap of css header contribution in the following case:

A parent panel have a CSS HC, a child panel also have a CSS HC. If the
original page does not includes any of those child panel (it is completely
newly added via an ajax request), then the child CSS HC is not taken into
account. I guess it is because both CSS HC share the same id...

<style type="text/css" id="com-mycompany-panel-RedBox-0">
    .box {
        width: 150px;
        border: 2px solid black;
    }
</style>
<style type="text/css" id="com-mycompany-panel-RedBox-0">
    .red {
        background-color: red;
    }
</style>

It *might* be due to WICKET-5617 (I just had performed a quick lookup based
on issue titles), but I didn't saw any other discussion/issue about this.

Does anybody heard about this? If not, I will open an issue...

Thanks & best regards,
Sebastien.

Re: CSS header contribution overlap

Posted by Sebastien <se...@gmail.com>.
Well, for the first part:
https://issues.apache.org/jira/browse/WICKET-6052

I will take the ticket (and will release it if I am not sure about the fix
:) )

On Thu, Dec 17, 2015 at 5:05 PM, Martin Grigorov <mg...@apache.org>
wrote:

> I see.
> Then yes, this is a bug.
> Ticket, quickstart / unit test, fix! ;-)
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Dec 17, 2015 at 5:01 PM, Sebastien <se...@gmail.com> wrote:
>
> > Hi Martin,
> >
> > Just wicket:header + <style type="text/css">
> >
> > Thanks,
> > Sebastien.
> >
> >
> > On Thu, Dec 17, 2015 at 4:52 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hi Sebastien,
> > >
> > > Which method do you use to contribute them?
> > > Both org.apache.wicket.markup.head.CssHeaderItem#forCSS() have 'id'
> > > parameter.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Thu, Dec 17, 2015 at 4:43 PM, Sebastien <se...@gmail.com> wrote:
> > >
> > > > Hi devs,
> > > >
> > > > There is an overlap of css header contribution in the following case:
> > > >
> > > > A parent panel have a CSS HC, a child panel also have a CSS HC. If
> the
> > > > original page does not includes any of those child panel (it is
> > > completely
> > > > newly added via an ajax request), then the child CSS HC is not taken
> > into
> > > > account. I guess it is because both CSS HC share the same id...
> > > >
> > > > <style type="text/css" id="com-mycompany-panel-RedBox-0">
> > > >     .box {
> > > >         width: 150px;
> > > >         border: 2px solid black;
> > > >     }
> > > > </style>
> > > > <style type="text/css" id="com-mycompany-panel-RedBox-0">
> > > >     .red {
> > > >         background-color: red;
> > > >     }
> > > > </style>
> > > >
> > > > It *might* be due to WICKET-5617 (I just had performed a quick lookup
> > > based
> > > > on issue titles), but I didn't saw any other discussion/issue about
> > this.
> > > >
> > > > Does anybody heard about this? If not, I will open an issue...
> > > >
> > > > Thanks & best regards,
> > > > Sebastien.
> > > >
> > >
> >
>

Re: CSS header contribution overlap

Posted by Martin Grigorov <mg...@apache.org>.
I see.
Then yes, this is a bug.
Ticket, quickstart / unit test, fix! ;-)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 17, 2015 at 5:01 PM, Sebastien <se...@gmail.com> wrote:

> Hi Martin,
>
> Just wicket:header + <style type="text/css">
>
> Thanks,
> Sebastien.
>
>
> On Thu, Dec 17, 2015 at 4:52 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hi Sebastien,
> >
> > Which method do you use to contribute them?
> > Both org.apache.wicket.markup.head.CssHeaderItem#forCSS() have 'id'
> > parameter.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Dec 17, 2015 at 4:43 PM, Sebastien <se...@gmail.com> wrote:
> >
> > > Hi devs,
> > >
> > > There is an overlap of css header contribution in the following case:
> > >
> > > A parent panel have a CSS HC, a child panel also have a CSS HC. If the
> > > original page does not includes any of those child panel (it is
> > completely
> > > newly added via an ajax request), then the child CSS HC is not taken
> into
> > > account. I guess it is because both CSS HC share the same id...
> > >
> > > <style type="text/css" id="com-mycompany-panel-RedBox-0">
> > >     .box {
> > >         width: 150px;
> > >         border: 2px solid black;
> > >     }
> > > </style>
> > > <style type="text/css" id="com-mycompany-panel-RedBox-0">
> > >     .red {
> > >         background-color: red;
> > >     }
> > > </style>
> > >
> > > It *might* be due to WICKET-5617 (I just had performed a quick lookup
> > based
> > > on issue titles), but I didn't saw any other discussion/issue about
> this.
> > >
> > > Does anybody heard about this? If not, I will open an issue...
> > >
> > > Thanks & best regards,
> > > Sebastien.
> > >
> >
>

Re: CSS header contribution overlap

Posted by Sebastien <se...@gmail.com>.
Hi Martin,

Just wicket:header + <style type="text/css">

Thanks,
Sebastien.


On Thu, Dec 17, 2015 at 4:52 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi Sebastien,
>
> Which method do you use to contribute them?
> Both org.apache.wicket.markup.head.CssHeaderItem#forCSS() have 'id'
> parameter.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Dec 17, 2015 at 4:43 PM, Sebastien <se...@gmail.com> wrote:
>
> > Hi devs,
> >
> > There is an overlap of css header contribution in the following case:
> >
> > A parent panel have a CSS HC, a child panel also have a CSS HC. If the
> > original page does not includes any of those child panel (it is
> completely
> > newly added via an ajax request), then the child CSS HC is not taken into
> > account. I guess it is because both CSS HC share the same id...
> >
> > <style type="text/css" id="com-mycompany-panel-RedBox-0">
> >     .box {
> >         width: 150px;
> >         border: 2px solid black;
> >     }
> > </style>
> > <style type="text/css" id="com-mycompany-panel-RedBox-0">
> >     .red {
> >         background-color: red;
> >     }
> > </style>
> >
> > It *might* be due to WICKET-5617 (I just had performed a quick lookup
> based
> > on issue titles), but I didn't saw any other discussion/issue about this.
> >
> > Does anybody heard about this? If not, I will open an issue...
> >
> > Thanks & best regards,
> > Sebastien.
> >
>

Re: CSS header contribution overlap

Posted by Martin Grigorov <mg...@apache.org>.
Hi Sebastien,

Which method do you use to contribute them?
Both org.apache.wicket.markup.head.CssHeaderItem#forCSS() have 'id'
parameter.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 17, 2015 at 4:43 PM, Sebastien <se...@gmail.com> wrote:

> Hi devs,
>
> There is an overlap of css header contribution in the following case:
>
> A parent panel have a CSS HC, a child panel also have a CSS HC. If the
> original page does not includes any of those child panel (it is completely
> newly added via an ajax request), then the child CSS HC is not taken into
> account. I guess it is because both CSS HC share the same id...
>
> <style type="text/css" id="com-mycompany-panel-RedBox-0">
>     .box {
>         width: 150px;
>         border: 2px solid black;
>     }
> </style>
> <style type="text/css" id="com-mycompany-panel-RedBox-0">
>     .red {
>         background-color: red;
>     }
> </style>
>
> It *might* be due to WICKET-5617 (I just had performed a quick lookup based
> on issue titles), but I didn't saw any other discussion/issue about this.
>
> Does anybody heard about this? If not, I will open an issue...
>
> Thanks & best regards,
> Sebastien.
>