Skip to content

Convert Layout Shell to Flexbox#133

Open
jsmecham wants to merge 4 commits intomasterfrom
flexbox-shell
Open

Convert Layout Shell to Flexbox#133
jsmecham wants to merge 4 commits intomasterfrom
flexbox-shell

Conversation

@jsmecham
Copy link
Contributor

@jsmecham jsmecham commented Mar 23, 2017

Changes the shell (i.e. <main-nav>, <account-switcher>, <pane>, ...) layout to use Flexbox. This started out as an attempt to use Flexbox without requiring any markup changes, but unfortunately, it is not backwards compatible as a new wrapper element is required for correct responsive/mobile support.

Changes

  • Favored using position: sticky on <main-nav> and <pane> contents in place of scroll observers.
  • Overflow scrolling in the <main-nav> is now handled natively with overflow in place of buttons to scroll up and down with JavaScript.
  • Extracted the height of the account switcher into a variable for easier reference/calculation.
  • The body is now a flex container.
  • Added a new "main" wrapper (.main-wapper) that allows us to properly layout panes in mobile or responsive modes.
  • The pane template now has an additional wrapper for pane content to allow position: sticky to work correctly.

Notes

  • We might want to require an outer wrapper as to not make the body itself a flex container.
  • The addition of the main wrapper is a change that requires consumers of Cyclops to implement.

The inline style isn’t processed with autoprefixer, so it needs to be
there for WebKit browsers.
* Switches main navigation and panes to use sticky positioning.
* Requires panes and main content area to be wrapped when used together.
@jsmecham jsmecham changed the title [WIP] Convert Layout Shell to Flexbox Convert Layout Shell to Flexbox Apr 13, 2017
@pascualin
Copy link
Contributor

pascualin commented Sep 15, 2017

@jsmecham is this still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants