flexbox float float:left float float float float Dificultad - - PowerPoint PPT Presentation

flexbox float
SMART_READER_LITE
LIVE PREVIEW

flexbox float float:left float float float float Dificultad - - PowerPoint PPT Presentation

flexbox float float:left float float float float Dificultad para organizar El posicionamiento visual depende del markup No puedes centrar No controlas las alturas en sistemas de columnas table display:table


slide-1
SLIDE 1
slide-2
SLIDE 2

flexbox

slide-3
SLIDE 3

float

float:left

slide-4
SLIDE 4

float

slide-5
SLIDE 5

float

slide-6
SLIDE 6

float

slide-7
SLIDE 7

float

  • Dificultad para organizar
  • El posicionamiento visual depende del markup
  • No puedes centrar
  • No controlas las alturas en sistemas de columnas
slide-8
SLIDE 8

table

display:table display:table-cell display:table-row display:table-caption …

slide-9
SLIDE 9

display:table-cell

slide-10
SLIDE 10

display:table-cell

slide-11
SLIDE 11

flexbox

slide-12
SLIDE 12

flexbox

display:flex

slide-13
SLIDE 13

flexbox

display:-ms-flexbox; display:flex

slide-14
SLIDE 14

flexbox

display:-moz-flex; display:-ms-flexbox; display:flex

slide-15
SLIDE 15

flexbox

display:-webkit-flex; display:-moz-flex; display:-ms-flexbox; display:flex

slide-16
SLIDE 16

flexbox

display:-webkit-box; display:-webkit-flex; display:-moz-flex; display:-ms-flexbox; display:flex

slide-17
SLIDE 17

caniuse.com

slide-18
SLIDE 18
slide-19
SLIDE 19

flexbox

display:-webkit-box; display:-webkit-flex; display:-moz-flex; display:-ms-flexbox; display:flex @include flexbox;

slide-20
SLIDE 20

flexbox

Provee una forma más eficiente de maquetar cubriendo espacios disponibles expandiendo elementos o encogiéndolos.

slide-21
SLIDE 21

.container { display: flex; }

slide-22
SLIDE 22

eje horizontal

slide-23
SLIDE 23

.container { display: flex; justify-content: flex-start; } .item { }

slide-24
SLIDE 24

justify-content: flex-start

slide-25
SLIDE 25

.container { display: flex; justify-content: flex-end; } .item { }

slide-26
SLIDE 26

justify-content: flex-end

slide-27
SLIDE 27

.container { display: flex; justify-content: center; } .item { }

slide-28
SLIDE 28

justify-content: center

slide-29
SLIDE 29

.container { display: flex; justify-content: space-between; } .item { }

slide-30
SLIDE 30

justify-content: space-between

slide-31
SLIDE 31

.container { display: flex; justify-content: space-around; } .item { }

slide-32
SLIDE 32

justify-content: space-around

slide-33
SLIDE 33

justify-content

justify-content: flex-start justify-content: flex-end justify-content: center justify-content: space-between justify-content: space-around

slide-34
SLIDE 34

.container { display: flex; justify-content: space-around; flex-wrap: wrap; } .item { width: 200px; }

slide-35
SLIDE 35

flex-wrap

slide-36
SLIDE 36

flex-wrap

slide-37
SLIDE 37

eje vertical

slide-38
SLIDE 38

.container { display: flex; justify-content: flex-end; align-items: flex-start; // default } .item { }

slide-39
SLIDE 39

align-items: flex-start

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

slide-40
SLIDE 40

.container { display: flex; justify-content: flex-end; align-items: flex-end; } .item { }

slide-41
SLIDE 41

align-items: flex-end

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

slide-42
SLIDE 42

.container { display: flex; justify-content: flex-end; align-items: center; } .item { }

slide-43
SLIDE 43

align-items: center

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

slide-44
SLIDE 44

.container { display: flex; justify-content: flex-end; align-items: stretch; } .item { }

slide-45
SLIDE 45

align-items: stretch

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

slide-46
SLIDE 46

propiedades de hijos

.item { width: 200px; }

slide-47
SLIDE 47

.container { display: flex; } .item { width: 200px;

  • rder: 0;

flex-grow: 0; flex-shrink: 0; align-self: auto; flex-basis: auto; }

slide-48
SLIDE 48

.container { display: flex; } .mariachi { width: 200px;

  • rder: 1;

flex-grow: 0; flex-shrink: 0; align-self: auto; flex-basis: auto; }

slide-49
SLIDE 49

flex children

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

  • rder: 1;

markup order: 1 markup order: 3 markup order: 2

slide-50
SLIDE 50

flex children

  • rder: -1;

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

markup order: 1

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

markup order: 3

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

markup order: 2

slide-51
SLIDE 51

.container { display: flex; } .mariachi { width: 200px;

  • rder: 0;

flex-grow: 2; flex-shrink: 0; align-self: auto; flex-basis: auto; }

slide-52
SLIDE 52

flex children

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

flex-grow: 2;

slide-53
SLIDE 53

.container { display: flex; } .mariachi { width: 200px;

  • rder: 0;

flex-grow: 0; flex-shrink: 0; align-self: flex-end; flex-basis: auto; }

slide-54
SLIDE 54

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

flex children

align-self: flex-end;

slide-55
SLIDE 55

José Dimas es fundador de Ockham Ti, empresa de desarrollo de software, app móviles, videojuegos y cursos. Profesor de universidad. Ha trabajado en varias universidades de El Caribe, México y de EscuelaIT.

El Mariachi

I create scalable and robust CSS, focusing in maintainability. I Apply DRY rules and some OOCSS (Not every time, CSS is still cascade) and I always comment my CSS with BEM comments. I usually attach myself to these rules and guidelines when coding CSS. I use CSS frameworks, (not design frameworks like Bootstrap/Foundation or similar). I believe a framework should do your work easier, it is not meant to do ALL the work: Every project evolves in a different way and depending on its path.

Wakkos

I work with various technology companies as a consultant, trainer and developer. In computer engineering emphasizes my passion for mobile applications across platforms, but with special emphasis on training, where implement my own method: LEX, by which several startups have been able to begin to take their first steps into the applications sector. Over 25 years of commitment to the industry.

El Padrino

flex children

align-self: stretch;

slide-56
SLIDE 56

.form { display: flex; } input[type=text] { width: 100%; } input[type=submit] { flex-basis: 100px; }

slide-57
SLIDE 57

<form action="" class="form"> <input type="text" /> <input type="submit" /> </form>

slide-58
SLIDE 58

submit

slide-59
SLIDE 59

submit

slide-60
SLIDE 60
slide-61
SLIDE 61