M
M
mishapsv2015-06-18 11:16:13
css
mishapsv, 2015-06-18 11:16:13

Why doesn't Safari work correctly with flexbox?

I use for the ribbon, the text in which should be centered flexbox.
Everywhere everything is fine, except for Safari - there the text is pressed against the top border.
jsbin.com/pudiyajipu/edit?html ,css,output
Any ideas?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Sergey ZSA, 2015-06-18
@serjikz

I do this to support old browsers and jokes with webkit and others:

display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex-wrap: wrap;
-moz-flex-wrap: wrap;
-ms-flex-wrap: wrap;
-o-flex-wrap: wrap;
flex-wrap: wrap;

This is all instead
flex-wrap: wrap;
display: flex;
justify-content: space-between;

A
anxieter, 2016-02-02
@anxieter

Good afternoon.
I also encountered incorrect display of flex-box in Safari (more precisely, on the IPAD Mini device)
The developer console in Chrome displays everything exactly, there is just an emulation of this device. On the device itself, everything goes.
Registered display: -webkit
-box;
-webkit-align-items: center;
-webkit-justify-content: space-between;
For some reason, this began to conflict, and everything works again in Chrome and other browsers. I remove display: -webkit-box; - everything in Chrome becomes ok. But Safari in this form still does not work.
Comments like update Safari are not accepted.
I don't use techniques like Grunt and Autoprefixer - do they really solve my problem?.. It just takes time to learn.... Is there a faster solution?..

A
Alexey Rytikov, 2015-06-18
@chlp

caniuse.com/#feat=flexbox claims that the current Safari 8 is friendly with flexbox only through the -webkit- prefix

I
Igor Lanko, 2015-06-18
@zzloy

Run through the Prepros 'a autoprefixer. He also knows how to optimize the code.
Several times easier: you write code, for example, only in Chrome (and only for it), then you send the code to Prepros, and it independently configures everything for other browsers (speaking of CSS, for example).

D
Denis Ineshin, 2015-06-18
@IonDen

Start using Grunt and Autoprefixer to it. Well, or Gulp and Autoprefixer to it.

V
Vladimir Kulikov, 2020-03-27
@it_proger29

https://autoprefixer.github.io/en/ I use this service for code prefixes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question