// Auto width
@include -zf-each-breakpoint() {
- // This is a bit of a hack/workaround, see these PRs for the backstory:
+ // This is a bit of a hack/workaround, see these issues & PRs for the backstory:
+ // https://github.com/zurb/foundation-sites/issues/10244
// https://github.com/zurb/foundation-sites/pull/10222 and
// https://github.com/zurb/foundation-sites/pull/10164
- .grid-x > [class*="#{$-zf-size}-"]:not([class*="#{$-zf-size}-order"]):not([class*="#{$-zf-size}-offset"]) {
- flex-basis: auto;
+ .grid-x {
+ $str: "> #{$-zf-size}-shrink, > #{$-zf-size}-full";
+ @for $i from 1 through $grid-columns {
+ $str: $str + ", > #{$-zf-size}-#{$i}"
+ }
+ #{$str} {
+ flex-basis: auto;
+ }
}
+ }
+
+ @include -zf-each-breakpoint() {
@if not($-zf-size == small) {
.grid-x > .#{$-zf-size}-auto {
@include xy-cell-base(auto);
@include -zf-each-breakpoint() {
- // This is a bit of a hack/workaround, see these PRs for the backstory:
+ // This is a bit of a hack/workaround, see these issues and PRs for the backstory:
+ // https://github.com/zurb/foundation-sites/issues/10244
// https://github.com/zurb/foundation-sites/pull/10222 and
// https://github.com/zurb/foundation-sites/pull/10164
- > [class*="#{$-zf-size}-"]:not([class*="#{$-zf-size}-order"]):not([class*="#{$-zf-size}-offset"]) {
+ $str: "> #{$-zf-size}-shrink, > #{$-zf-size}-full";
+ @for $i from 1 through $grid-columns {
+ $str: $str + ", > #{$-zf-size}-#{$i}"
+ }
+ #{$str} {
flex-basis: auto;
}
+ }
+ @include -zf-each-breakpoint() {
@if not($-zf-size == small) {
> .#{$-zf-size}-auto {
@include xy-cell-base(auto);
<div class="cell small-7 large-shrink"><div class="demo">7 on small, shrink on large</div></div>
</div>
+ <div class="grid-x grid-margin-x">
+ <div class="cell small-5 large-auto"><div class="demo">5 on small, auto on large with a ton of content that should still be even</div></div>
+ <div class="cell small-7 large-auto"><div class="demo">7 on small, auto on large</div></div>
+ </div>
+
<h3>Margin - collapse</h3>
<p>The cells should collapse on large screens and above.<p>