]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix flex-grid-column with nowrap child 8511/head
authorNicolas Coden <nicos.coden@neuf.fr>
Sat, 2 Apr 2016 01:37:51 +0000 (03:37 +0200)
committerNicolas Coden <nicos.coden@neuf.fr>
Sat, 2 Apr 2016 01:37:51 +0000 (03:37 +0200)
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

scss/grid/_flex-grid.scss

index dd5e235cb8f189374cdbf4755c9a5636fcaa4bf3..c746e4735b67846031e61f04e21c854cd2fb868e 100644 (file)
     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);