fukol-grids icon indicating copy to clipboard operation
fukol-grids copied to clipboard

Beware of min-width and min-height

Open raphaelgoetter opened this issue 8 years ago • 4 comments

Hello,

You might consider adding some min-content fix on flex-items :

.fukol-grids > * {
  min-width: 0;
  min-height: 0;
}

Sources :

  • https://css-tricks.com/flexbox-truncated-text/
  • http://www.alsacreations.com/astuce/lire/1701-images-responsive-flexbox-bug-ratio.html (fr)

raphaelgoetter avatar Oct 31 '16 08:10 raphaelgoetter

Interesting! Do you have a test case?

Heydon avatar Oct 31 '16 10:10 Heydon

The 2 links above contain test cases.

TLDR : all replaced elements (img, input, textarea, etc.) or long words like URL can break your flex-item without this "hack".

raphaelgoetter avatar Oct 31 '16 10:10 raphaelgoetter

I actually ran into this just last week (not with Fukol, sorry, I used a "homebrew" version :P). Thanks for the links, I'm much happier knowing why that happened!

Mottokrosh avatar Nov 21 '16 12:11 Mottokrosh

Almost 5 years old but still interesting. Looks like the min-width hack isn't necessary: https://css-tricks.com/flexbox-truncated-text/#comment-1601483

cweekly avatar Oct 06 '20 21:10 cweekly