Wp-calypso: Media Section: Fix sticky nav styling for smaller viewports

Created on 13 Mar 2017  Â·  4Comments  Â·  Source: Automattic/wp-calypso

Currently as we scroll down the action bar doesn't fully cover the div behind.

nav

To reproduce:

Media [Type] Bug

Most helpful comment

I'd say let's make it not sticky less than 660px width for now.

All 4 comments

The perspective CSS rule breaks the fixed position of the sticky panel.

https://github.com/Automattic/wp-calypso/blob/master/client/components/main/style.scss#L26

@include breakpoint( "<660px" ) {
  backface-visibility: hidden;
  perspective: 1000;
}

Testing further it seems like we have a few mobile cases, where we either should not attempt to sticky the nav or fix the component to work in the view.

✅ This doesn't attempt to collapse at all:
screen shot 2017-03-13 at 3 21 40 pm

Collapses incorrectly without plan storage visible:
screen shot 2017-03-13 at 3 21 21 pm

Collapses incorrectly with plan storage visible:
screen shot 2017-03-13 at 3 22 21 pm

I'd say let's make it not sticky less than 660px width for now.

The perspective CSS rule breaks the fixed position of the sticky panel.

I've suggested in Slack too, but we could only add perspective only when the sidebar is focused because that's for keeping the sidebar on top of the content, and it's only needed when the sidebar is open.

.focus-sidebar .main,
.focus-sites .main {
    perspective: 1000;
}
Was this page helpful?
0 / 5 - 0 ratings