googlearchive / core-scroll-header-panel

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

Header panel background is transparent during transition #45

Open Ajedi32 opened 9 years ago

Ajedi32 commented 9 years ago

The current implementation of #condensedHeaderBg and #headerBg has the opacity of both elements set to 0.5 when you are exactly half way through the transition from the condensed and full-sized header. This leaves the bar with an effective opacity of 0.75.

The correct implementation should be for the element on the bottom to remain at a constant opacity of 1, while the top element's opacity varies from 0 to 1, depending on the current point in the transition. This will ensure that the bar remains at an effective overall opacity of 1 throughout the entire transition.