Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Make dropdown respect boundaries of browser Foundation 5 #5986

Merged
merged 5 commits into from Oct 30, 2014
Merged

Fix: Make dropdown respect boundaries of browser Foundation 5 #5986

merged 5 commits into from Oct 30, 2014

Conversation

coreysyms
Copy link
Contributor

@coreysyms coreysyms changed the title Make dropdown respect boundaries of browser Fix: Make dropdown respect boundaries of browser Oct 29, 2014
file failed with travis, resubmit
travis failed, resubmitting, had undefined var.
@coreysyms coreysyms changed the title Fix: Make dropdown respect boundaries of browser Fix: Make dropdown respect boundaries of browser Foundation 5 Oct 29, 2014
@soraphis
Copy link

the width of the dropdown should be independent of the colum-width of the parent.

set the size of your columns from large-6 medium-12 to large-2 medium-2 (or even 1) it results to rly small dropdowns.

Changes to fix medium grid break-point
@coreysyms
Copy link
Contributor Author

@soraphis You bring up an interesting point and something I struggled with not on a technical level, but a hypothetical level. By default how I'm displaying the drop down is the same as Foundation 5 raw, but should it be this way?

The docs say medium drop down, up to max-width:500px. So that means the drop down will respect the parent width up to a max of 500. But in your case, a medium drop down in a large-2 looks like a small.

You can override this in the CSS on line 5302 foundation.css in .f-dropdown.medium. Just add a min-width. Im debating if I should write this in automatically.

Thoughts?

@soraphis
Copy link

Imho it should be independent of the parent size.
i think it should be just dependent off "small / medium (default) / large / ..."

@coreysyms
Copy link
Contributor Author

@soraphis I think I might write in a new option, something like, "override parent width" to allow the max width even if the parent is not. Stay tuned.

@rafibomb
Copy link
Member

My opinion on this is that it should be independent. The only time I can see it needing to respect the parent element width is using a button group. We have a mega class for dropdowns now that spans the full width of a row.

hellapixels pushed a commit that referenced this pull request Oct 30, 2014
Fix: Make dropdown respect boundaries of browser Foundation 5
@hellapixels hellapixels merged commit c82e8a8 into foundation:master Oct 30, 2014
@rafibomb
Copy link
Member

@coreysyms Hey awesome work iterating and making this happen. We'll keep testing on master with different setups.

Shoot us an email to foundation at zurb .com for a Yeti t-shirt. Need your mailing address and size.

@coreysyms
Copy link
Contributor Author

@rafibomb Thanks, Emailed. My company and I use Foundation a lot, so I'm glad I got to give back a little. Will start another pull request once I figure out independent child sizing for the drop down box.

@istrasoft
Copy link
Contributor

Cool, but not possible any more to choose which alternate directions should the dropdown use when the desired direction does not have enough space ?...

@LauraLalune
Copy link

+1 @soraphis
I still have problems with 5.5 release. I finally fixed via css !important declaration on the .open class applied to the specific dropdown element

&.open {
    right: 134px!important; left: auto!important;
}
&:before{
    border-bottom-color:$body-copy;
    right: 21px!important; left:auto !important;
}

anyone else who still experiences the problem?

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.

None yet

6 participants