L
L
lavezzi12016-11-08 19:13:35
css
lavezzi1, 2016-11-08 19:13:35

How to fix a bug in Safari with flexbox?

Hello, I encountered such a problem, if there is no space for blocks in the container, then in the latest version of safari they do not jump to a new line, but tear the container. What is the reason?
Demo:
codepen.io/anon/pen/LbVMaN
In general, I took the implementation from here flexboxgrid.com

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
bromzh, 2016-11-08
@lavezzi1

.col-auto {
    flex-grow: 1;
    flex-basis: initial; // Тут надо не 0, а initial, например. 
// Иначе сафари справедливо считает, что мин. размер блока нулевой, 
// так что переносить блоки не надо, они всё равно помещаются
    max-width: 100%;
    padding: 8px;
}

PS And .row does not need to be written `flex: 0 1 auto;`, unless it is. is not itself a child of a flex element.

A
Andrey Verkh, 2016-11-08
@sadisme

Make it a rule to specify flex:0 1 auto (or your own values, of course) for elements, so as not to run into bugs later.

A
Ankhena, 2016-11-08
@Ankhena

https://autoprefixer.github.io/en/ doesn't help you?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question