18F / 2015-foia-hub

A consolidated FOIA request hub.
Other
48 stars 17 forks source link

[WIP] Responsive nav #674

Closed shawnbot closed 9 years ago

shawnbot commented 9 years ago

:warning: :construction: Work in Progress :construction: :warning:

This PR heavily refactors the navigation styles and institutes pixel-length responsive breakpoints throughout. See below for screenshots. This needs a few things before being merged:

shawnbot commented 9 years ago

:warning: :high_heel: :horse:

Incidentally, I think this PR is a great example of how mobile-first design, and progressive enhancement more generally, can save us a lot of time. Preserving the styles so as not to break the wide-screen layout was tricky, and I may have introduced a regression or two in the process. In a perfect world, these styles would be further refactored so that:

  1. The "initial" styles (i.e. not grouped under any @media blocks) would establish a reasonable-looking site that flows well on smaller screens and looks passable on larger ones.
  2. @media blocks with min-width: breakpoint would group together progressive enhancements for progressively larger breakpoint lengths (screen sizes).

What we've got right now is kind of Frankenstein's Responsive Web Design Monster, with a bunch of "initial" styles, a chunk of styles in an @media block that only apply to smaller screens, then @media blocks that undo things done either initially or under a smaller breakpoint. I've tried to get close to the ideal, but I would've had to unravel the whole thing to get all the way there, and that didn't seem worth the time.

shawnbot commented 9 years ago

Here's what it looks like on the iOS simulator (and at screen widths < 480px):

image

image

shawnbot commented 9 years ago

Under 980px the nav links drop below the logo and the search bar floats right:

image

shawnbot commented 9 years ago

Things to fix:

image

shawnbot commented 9 years ago

Fix search popup positioning on smaller screens:

image

shawnbot commented 9 years ago

Fix the alignment of the openFOIA logo with the left gutter below, before:

image

after:

image

shawnbot commented 9 years ago

Moving the tasks from comments into the description...

khandelwal commented 9 years ago

Should this pull request be closed?

shawnbot commented 9 years ago

Yes, it should!