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

Responsive top bar has issues with $global-flexbox: true #8325

Closed
gremmie opened this issue Mar 3, 2016 · 5 comments · Fixed by #9442
Closed

Responsive top bar has issues with $global-flexbox: true #8325

gremmie opened this issue Mar 3, 2016 · 5 comments · Fixed by #9442
Milestone

Comments

@gremmie
Copy link
Contributor

gremmie commented Mar 3, 2016

How can we reproduce this bug?

Note: Using Foundation 6.2

  1. Use flex grid in sass as described here
  2. $global-flexbox: true;
  3. Create a top bar like this:
<div class="top-bar" id="main-menu">
   <div class="top-bar-left">
      <ul class="menu vertical medium-horizontal expanded" data-responsive-menu="drilldown medium-dropdown">
        <li>
          <a href="#">Item 1</a>
          <ul class="menu">
            <li><a href="#">Item 1A</a></li>
            <li><a href="#">Item 1B</a></li>
            <li><a href="#">Item 1C</a></li>
          </ul>
        </li>
        <li>
          <a href="#">Item 2</a>
          <ul class="menu">
            <li><a href="#">Item 2A</a></li>
            <li><a href="#">Item 2B</a></li>
            <li><a href="#">Item 2C</a></li>
          </ul>
        </li>
      </ul>
   </div>
</div>

What did you expect to happen?

  • Menus are expanded across width of screen
  • Menus go vertical when the screen size is shrunk

What happened instead?

  • Menus are aligned to the left instead of expanded
  • When the screen is made smaller, the menus do not go vertical, they stay horizontal, although it looks like the drilldown functionality is still mostly working.

Changing $global-flexbox: false; fixes these 2 issues.

Thanks.

@lokiloq
Copy link

lokiloq commented Mar 4, 2016

I also have an issue involving the topbar and $global-flexbox: true.

When I change $global-flexbox from false to true, running sass task (grunt) print the following error in my terminal :

Running "watch" task
Completed in 1.569s at Fri Mar 04 2016 17:16:42 GMT+0100 (CET) - Waiting...
>> File "src/sass/_settings.scss" changed.

Running "sass:dist" (sass) task
Error: Properties are only allowed within rules, directives, mixin includes, or other properties.
        on line 80 of /Users/XXX/XXXX/XXXXX/node_modules/foundation-sites/scss/components/_top-bar.scss
  Use --trace for backtrace.
Warning: Exited with error code 65

Maybe that is related to @gremmie 's problem?

Regards.

@gremmie
Copy link
Contributor Author

gremmie commented Mar 5, 2016

@lokiloq No, I don't have any problems compiling the sass.

I should mention that I had rearranged the order of @includes as per issue #8278.

@mortenson
Copy link

Confirmed and seeing the same issue after upgrading from 6.1 to 6.2.

@RobEasthope
Copy link

I managed to fix this by renaming the default .top-bar class in the markup and including the component in the renamed class: .header-bar { @include top-bar-container; }.

I don't know why it fixes the issue however, presumably there is a bug in the default foundation settings?

natewiebe13 added a commit to natewiebe13/foundation-sites that referenced this issue May 12, 2016
@rafibomb rafibomb modified the milestones: 6.2.2, 6.3 May 31, 2016
@kball
Copy link
Contributor

kball commented Dec 1, 2016

Unfortunately this is getting pushed out to 6.3.1

@kball kball modified the milestones: 6.3.1, 6.3 Dec 1, 2016
ncoden added a commit to ncoden/foundation-sites that referenced this issue Dec 4, 2016
Fix foundation#8325.
See also: foundation#8779. Thanks to
@natewiebe13.

`.expanded` is a modifier for a horizontal menu, and should not be
applied on a vertical one.

Changes:
- Move the `.expanded` modifier after `.horizontal` and before
`.vertical`.
- Add the `.expanded` modifiers for each breakpoint with the
corresponding prefixes.

Note: The `.expanded` modifier should be applied only when the menu is
horizontal. For example, on a menu which is made horizontal on the
medium breakpoint, `.medium-expanded` should be used :
`.menu.vertical.medium-horizontal.medium-expanded`.
@ncoden ncoden mentioned this issue Dec 4, 2016
1 task
ncoden added a commit to ncoden/foundation-sites that referenced this issue Dec 4, 2016
Fix foundation#8325.
See also: foundation#8779. Thanks to
@natewiebe13.

`.expanded` is a modifier for a horizontal menu, and should not be
applied on a vertical one.

Changes:
- Move the `.expanded` modifier after `.horizontal` and before
`.vertical`.
- Add the `.expanded` modifiers for each breakpoint with the
corresponding prefixes.

Other changes:
- Use `-zf-each-breakpoint` to generate responsive modifiers.

Note: The `.expanded` modifier should be applied only when the menu is
horizontal. For example, on a menu which is made horizontal on the
medium breakpoint, `.medium-expanded` should be used :
`.menu.vertical.medium-horizontal.medium-expanded`.
ncoden added a commit to ncoden/foundation-sites that referenced this issue Dec 6, 2016
Fix foundation#8325.
See also: foundation#8779. Thanks to
@natewiebe13.

`.expanded` is a modifier for a horizontal menu, and should not be
applied on a vertical one.

Changes:
- Move the `.expanded` modifier after `.horizontal` and before
`.vertical`.
- Add the `.expanded` modifiers for each breakpoint with the
corresponding prefixes.

Other changes:
- Use `-zf-each-breakpoint` to generate responsive modifiers.

Note: The `.expanded` modifier should be applied only when the menu is
horizontal. For example, on a menu which is made horizontal on the
medium breakpoint, `.medium-expanded` should be used :
`.menu.vertical.medium-horizontal.medium-expanded`.
ncoden added a commit to ncoden/foundation-sites that referenced this issue Dec 6, 2016
Fix foundation#8325.
See also: foundation#8779. Thanks to
@natewiebe13.

`.expanded` is a modifier for a horizontal menu, and should not be
applied on a vertical one.

Changes:
- Move the `.expanded` modifier after `.horizontal` and before
`.vertical`.
- Add the `.expanded` modifiers for each breakpoint with the
corresponding prefixes.

Other changes:
- Use `-zf-each-breakpoint` to generate responsive modifiers.

Note: The `.expanded` modifier should be applied only when the menu is
horizontal. For example, on a menu which is made horizontal on the
medium breakpoint, `.medium-expanded` should be used :
`.menu.vertical.medium-horizontal.medium-expanded`.
kball added a commit that referenced this issue Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants