From: Nicolas Coden Date: Sat, 2 Apr 2016 01:37:51 +0000 (+0200) Subject: Fix flex-grid-column with nowrap child X-Git-Tag: v6.2.1~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8edb5aa438aba94de1678b3162a2491e62082d8;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fix flex-grid-column with nowrap child On the last version of chrome, the child of a `flex-grid-column(null)` with ```css white-space: nowrap; overflow: hidden; ``` doesn't have a limited size, and the full content is showed in one line exceeding the row. `min-width: 0;` fix this problem, probably by remembering to chrome to evaluate the column width with a `0px` content width (it's what `flex: 1 1 0px` should do). https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flex box-did-not-work-in-chrome --- diff --git a/scss/grid/_flex-grid.scss b/scss/grid/_flex-grid.scss index dd5e235cb..c746e4735 100644 --- a/scss/grid/_flex-grid.scss +++ b/scss/grid/_flex-grid.scss @@ -96,6 +96,11 @@ padding-right: $padding; } + // fixes recent Chrome version not limiting child width + // https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flexbox-did-not-work-in-chrome + @if $columns == null { + min-width: 0; + } // max-width fixes IE 10/11 not respecting the flex-basis property @if $columns != null and $columns != shrink { max-width: grid-column($columns);