Firefox (mind. bis FF 36.0a2) hat einen Bug, der imgs innerhalb von flex items betrifft: Wenn dem img die Eigenschaft max-width mit einem Prozent-Wert wie 100% zugewiesen wird, ignoriert Firefox das und vergrößert bei zu kleiner device-width das umgebende Element, das Kind eines Containers mit display: flex ist, auf die Originalbreite der Bild-Datei.
Ich habe einen Javascript-Workaround geschrieben, der aber nur leidlich funktioniert. (Er basiert darauf, dass der Bug nicht auftritt, wenn man die relative Einheit vw anstatt % verwendet.) Das muss ordentlich gemacht werden.
Firefox (at least to FF 36.0a2) has a Bug which hits imgs within flexbox items: When the img has set a max-width with a percentage like 100%, Firefox ignores this. Instead, when the device width is smaller than the image source, Firefox enlarges the flex item containing the image to the inherent width of the image source file.
I wrote a JavaScript workaround but it doesn't work that well. (It's based on the fact that the bug doesn't appear when you use the relative unit vw instead of %.) Have to do this better.
Firefox (mind. bis FF 36.0a2) hat einen Bug, der
img
s innerhalb von flex items betrifft: Wenn demimg
die Eigenschaftmax-width
mit einem Prozent-Wert wie100%
zugewiesen wird, ignoriert Firefox das und vergrößert bei zu kleiner device-width das umgebende Element, das Kind eines Containers mitdisplay: flex
ist, auf die Originalbreite der Bild-Datei.Beispiel (CodePen)
Ich habe einen Javascript-Workaround geschrieben, der aber nur leidlich funktioniert. (Er basiert darauf, dass der Bug nicht auftritt, wenn man die relative Einheit
vw
anstatt%
verwendet.) Das muss ordentlich gemacht werden.Firefox (at least to FF 36.0a2) has a Bug which hits
img
s within flexbox items: When theimg
has set amax-width
with a percentage like100%
, Firefox ignores this. Instead, when the device width is smaller than the image source, Firefox enlarges the flex item containing the image to the inherent width of the image source file.Example (CodePen)
I wrote a JavaScript workaround but it doesn't work that well. (It's based on the fact that the bug doesn't appear when you use the relative unit
vw
instead of%
.) Have to do this better.