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

Medium and up class prefixes being generated as small #10472

Closed
brettsmason opened this issue Jul 27, 2017 · 6 comments · Fixed by #10491
Closed

Medium and up class prefixes being generated as small #10472

brettsmason opened this issue Jul 27, 2017 · 6 comments · Fixed by #10491

Comments

@brettsmason
Copy link
Contributor

Following on from this comment I have discovered that classes prefixed with their breakpoint name eg size-collapse, size-uncollapse and size-unstack are all receiving the prefix small.

I've tracked this down to this commit - if I revert this then classes are generated correctly.

I've done a diff for generated CSS with and without that PR and all it changes is the incorrect prefixes, so looks like thie is indeed the culprit.

@kball Can you confirm?

@brettsmason
Copy link
Contributor Author

@Luckyfella73 I've set this up as a new issue to stop the other issue being populated with this.

@kball
Copy link
Contributor

kball commented Jul 27, 2017

@brettsmason do you remember the impetus for that commit? Want to make sure this doesn't break something else

@brettsmason
Copy link
Contributor Author

@kball I believe it was to do with this: https://github.com/zurb/foundation-sites/blob/develop/scss/xy-grid/_cell.scss#L110

Basically allowing the xy-cell mixin to automatically detect the breakpoint size and output the correct gutters for that breakpoint. However I've tested locally and reversing that change makes no difference when creating my own class with xy-cell within an @include breakpoint call.

@brettsmason
Copy link
Contributor Author

Actually scratch that... it does impact xy-cell - will post results now

@brettsmason
Copy link
Contributor Author

Sass:

.my-cell {
    @include xy-cell;

    @include breakpoint(medium) {
        @include xy-cell(4);
    }
}

Current generated CSS:

.my-cell {
  -webkit-flex: 0 0 auto;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  min-height: 0px;
  min-width: 0px;
  width: calc(100% - 1.25rem);
  margin-right: 0.625rem;
  margin-left: 0.625rem; }
  @media print, screen and (min-width: 40em) {
    .my-cell {
      width: calc(33.33333% - 1.875rem);
      margin-right: 0.9375rem;
      margin-left: 0.9375rem; } }

With commit reversed:

.my-cell {
  -webkit-flex: 0 0 auto;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  min-height: 0px;
  min-width: 0px;
  width: calc(100% - 1.875rem); }
  @media print, screen and (min-width: 40em) {
    .my-cell {
      width: calc(33.33333% - 1.875rem); } }

@IamManchanda
Copy link
Contributor

IamManchanda commented Jul 27, 2017

So its just responsive gutters!

@kball kball mentioned this issue Aug 1, 2017
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 a pull request may close this issue.

3 participants