dobtco / dvl-core

Base styles for the DOBT View Layer.
https://design.dobt.co/
1 stars 1 forks source link

Responsive positioning of dropdowns #129

Open jrubenoff opened 9 years ago

jrubenoff commented 9 years ago

Stemming off issue 8 here. Having a separate .dropdown_right class is problematic on a responsive site.

If a .dropdown button is placed on the right side of the viewport on small screens, it will not be usable:

screen shot 2015-07-15 at 12 41 48 pm

The same occurs if a .dropdown_right button is on the left side on mobile:

screen shot 2015-07-15 at 12 42 15 pm

Two solutions come to mind immediately:

  1. Manually add responsive positioning classes on every dropdown button.
  2. Position dropdowns programmatically with JS.

I prefer the latter, I think, but would that solution be performant? Additional suggestions are welcome.

ajb commented 9 years ago

I bet someone else has solved this for Bootstrap already...

jrubenoff commented 9 years ago

Not in Bootstrap 4 alpha, at least:

screen shot 2015-09-23 at 12 54 24 pm