googlearchive / core-scroll-header-panel

Fancy scrolling effects where the header animates between tall and condensed states
19 stars 16 forks source link

Shadow like in core-header-panel waterfall mode #33

Open krossovochkin opened 9 years ago

krossovochkin commented 9 years ago

I think it would be great if core-scroll-header-panel has shadow (like in core-header-panel in waterfall mode, for example) when on scroll condensed header is kept. Because content could be under this header. And I think we should show this with shadow. (like in waterfall mode of core-header-panel).

Next, I would like to express my thoughts about polymer elements with one example.

Let's look on core-header-panel (chp) and core-scroll-header-panel (cshp). First one provides lot of different modes:

The second one (cshp) doesn't have modes. But it has some properties. By default cshp is similar to scroll mode of chp. But the header is above or on top (z-index) of the content. And header will be shown again as soon as you scroll content up, even if it is not the top. The most interesting property is keepCondensedHeader. With this property cshp looks like waterfall mode of chp. But the header could be on top of the content (waterfall chp is always on top) so you can theoretically scroll content pointing mouse over header (by default you can't, but this is not a huge problem, in chp with waterfall mode seems like its almost impossible). So, i think, that if you want to have header looks like waterfall mode, you'd better use cshp with keepCondensedHeader property. And workaround for scrolling content pointing mouse over header (see temp solution in #1). So, choosing element for your purposes in this case is not a very easy deal.

But back to the original issue: cshp header can be over content (by z-index), but there is no shadow in this case, so it doesn't look good, i think.

What do you think about this?