Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Responsive $grid-margin-gutters only work when XY-cell is included with a breakpoint #1121

Closed
studiobovenkamer opened this issue Oct 10, 2017 · 2 comments

Comments

@studiobovenkamer
Copy link

studiobovenkamer commented Oct 10, 2017

I'm working with the XY-grid. I tried to get different gutters for medium (30px) and small (15px), but I discovered that this only works when the xy-cells are nested in a breakpoint media query, like this:

.example-section{

@include xy-grid-container;
@include xy-grid;
  
.text {
    @include xy-cell(4);//the gutter will be small-sized for small screens
    
@include breakpoint(medium) {
      @include xy-cell(4);//now the gutter will be medium-sized, for medium screens and up
    }

  }
  .icon {
    @include xy-cell(3);//but this one always uses the small gutter size, also on medium screens. 
  }

}

I don't know if this is a bug or a feature, but I expected that in this example .icon would have responsive gutters too (just like it does with $grid-column-gutter) without nesting the cell in media queries. Currently this leads to extra coding, for example this could be simpler:

//To use the grid-margin-gutter map for small and medium, I need to write:
.responsive-something {
    @include xy-cell();
    @include breakpoint(medium) {
      @include xy-cell();
    }
}

//While it might be nicer to just write this 
.responsive-something {
    @include xy-cell();
}
@colin-marshall
Copy link
Collaborator

@studiobovenkamer that's a valid concern, but it is a Foundation issue, not a FoundationPress issue so you will need to raise the issue at https://github.com/zurb/foundation-sites.

@studiobovenkamer
Copy link
Author

Created a issue at foundation-sites:
foundation/foundation-sites#10743

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants