Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-16 Thread Emond Papegaaij
Hi all,

The CSP branch started to get a bit of a mess with work on different
parts of Wicket combined in one branch. I've reworked the commits, put
some of them on master, and split the rest on 2 branches:
csp-display-none and csp-configurable. Those are for reviewing the
code. I'll open a pull request when it's done. The csp branch is just
for me, as I need a branch with all work combined to test our
application and to see the effects of my changes. This branch will
remain a mess and will not be merged to master.

Best regards,
Emond


Re: [wicket] branch csp updated: WICKET-6725: replace display:none by wicket--hidden css class

2020-01-15 Thread Andrew Kondratev
Some kind of core CSS is likely to be needed, considering that ALL inline
styles should go not just hidden/display:none.

The special class is what I originally suggested. For me personally the
approach with css class would be easier to live with.

Another option to consider could be an inline  injected into the
heder. Unlike inline style attribute this can be nonced. Can't tell it's
better than predefined file, just hope this can trigger an idea in
someone's head.

чт, 16 янв. 2020 г. в 08:20, Emond Papegaaij :

> > > IMHO we have to decide first whether we want to use the "hidden"
> attribute.
> > > I'm not sure about the pros and cons at the moment.
> > >
> > > Depending on that decision (NO) we'll have to write CSS classes anyway
> > > or (YES) we might want to add them additionally.
> > > In the latter case I'm not sure we need a CSS file at all, just to
> > > contain "display: none".
> > >
> >
> > Right!
> > This is how this discussion started (question 1): if we use 'hidden'
> > attribute for this case then there is no need of CSS file.
> > For the other cases/tickets we can decide separately.
>
> I disagree on this point. We use display: flex quite a lot in our
> application. This will render the hidden attribute useless. The hidden
> attribute without additional styling will break our application (and
> therefore probably others as well). Whatever we do, we should make
> sure the tags stay hidden in most cases (we can't protect against very
> specific styling with !important).
>
> I'm ok with [data-wicket-placeholder][hidden] as a rule, but I don't
> see the benefit over class="wicket--hidden".
>
> Also, we keep on focusing on this particular use case, but there are
> others. How about this in Form:
>
> style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden".
> I'm not sure this can be replaced by hidden, maybe it can.
>
> Best regards,
> Emond
>
> > >
> > > Thanks
> > > Sven
> > >
> > >
> > > On 15.01.20 18:52, Martin Grigorov wrote:
> > > > On Wed, Jan 15, 2020, 19:29 Sven Meier  wrote:
> > > >
> > > >> I disagree, "hidden" has the perfect semantic for what we're doing
> with
> > > >> placeholders or other 
s. > > > >> > > > > How about such CSS rule: > > > > > > > > [data-wicket-placeholder][hidden] > > > > { > > > >display : none !important; > > > > } > > > > > > > > ? > > > > > > > > > > > >> Sven > > > >> > > > >> > > > >> On 15.01.20 11:44, Emond Papegaaij wrote: > > > > According to my tests > > > > textarea with hidden attribute works the same way as `display: > none` > > > > (latest Chrome, FF, Chromium) > > > > > > > >>> Maxim and Andrew: Yes, the display: none is very important. (That's > > > >>> why it even has !important). The hidden attribute has the lowest > > > >>> priority possible. Any matching CSS rule will override it's > behavior. > > > >>> For example, if you have this html: > > > >>> > > > >>>