> Le 2 mai 2015 à 06:50, David Hucklesby <huckle...@gmail.com> a écrit :
> 
> This is the bare bones of a grid of thumbnails. Works okay in Opera and 
> Chrome,
> but the top and bottom padding disappear in Firefox:
> 
> <http://codepen.io/hucklesby/pen/MwwXWP>
> 
> FWIW this does not happen in a float or inline-block layout.

The answer is here:
https://drafts.csswg.org/css-flexbox/#item-margins

[quote]
Percentage margins and paddings on flex items are always resolved against their 
respective dimensions; unlike blocks, they do not always resolve against the 
inline dimension of their containing block.
[/quote]

given that the height of your flex items (<figure>) is auto, the vertical 
padding computes to 0.


PS - don’t forget to add the -webkit- prefixed properties / values for Safari.


Philippe
--
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to