Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Layouts flexiveis com Flex-box
Search
Roger Albino
June 26, 2015
Programming
0
260
Layouts flexiveis com Flex-box
Campinas Front-End Meetup
Roger Albino
June 26, 2015
Tweet
Share
More Decks by Roger Albino
See All by Roger Albino
Utilizando Clean Code para deixar seu código ainda mais manutenível - TDC Transformation - Grupo Boticário
rogeralbinoi
0
460
Código Limpo (Clean Code) - FATEC DevDay 2021
rogeralbinoi
1
240
Desmistificando a Refatoração - TDC Innovation 2021
rogeralbinoi
1
220
Código Limpo - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
170
Princípios S.O.L.I.D - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
360
Construindo Progressive Web Apps - GDG Mogi Guaçu 2019
rogeralbinoi
1
190
Criando Componentes com ReactJS
rogeralbinoi
0
500
Other Decks in Programming
See All in Programming
CSC305 Lecture 01
javiergs
PRO
1
390
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
670
CSC305 Lecture 03
javiergs
PRO
0
230
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
130
Чего вы не знали о строках в Python – Василий Рябов, PythoNN
sobolevn
0
150
CSC509 Lecture 02
javiergs
PRO
0
400
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
440
Model Pollution
hschwentner
1
180
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
900
メモリ不足との戦い〜大量データを扱うアプリでの実践例〜
kwzr
1
780
ポスターセッション: 「まっすぐ行って、右!」って言ってラズパイカーを動かしたい 〜生成AI × Raspberry Pi Pico × Gradioの試作メモ〜
komofr
0
930
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
900
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Producing Creativity
orderedlist
PRO
347
40k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Writing Fast Ruby
sferik
629
62k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Transcript
Layouts flexíveis Layouts flexíveis com Flex-box com Flex-box
Roger Albino Roger Albino Sou desenvolvedor front-end na Vorax, em
Mogi Mirim. Front-ender, músico, e jogador de Pump it Up
None
Container Container
.container { display: flex; /* or inline-flex */ } Container
.container { flex-direction: row | row-reverse | column | column-reverse;
} Direction
.container{ flex-wrap: nowrap | wrap | wrap-reverse; } Wrap
flex-flow: <‘flex-direction’> || <‘flex-wrap’> Shorthand para flex-direction e flex-wrap
.container { justify-content: flex-start | flex-end | center | space-between
| space-around; } Justify Content
.container { align-items: flex-start | flex-end | center | baseline
| stretch; } Align-items
.container { align-content: flex-start | flex-end | center | space-between
| space-around | stretch; } align-content
Flex-item Flex-item
.item { order: <integer>; } order
.item { flex-grow: <number>; /* default 0 */ } Flex-grow
.item { flex-shrink: <number>; /* default 1 */ } Flex-shrink
.item { flex-basis: <length> | auto; /* default auto */
} Flex-basis
flex: none; /* 1 valor: flex-grow */ flex: 2; /*
1 valor: flex-basis */ flex: 30px; /* 2 valores: flex-grow | flex-basis */ flex: 1 30px; /* 2 valores: flex-grow | flex-shrink */ flex: 2 2; /* 3 valores: flex-grow | flex-shrink | flex-basis */ flex: 2 2 10%; Flex
.item { align-self: auto | flex-start | flex-end | center
| baseline | stretch; } Align-self
Posso usar? Posso usar?
http://caniuse.com/#feat=flexbox
@mixin flexbox() { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display:
-webkit-flex; display: flex; } @mixin flex($values) { -webkit-box-flex: $values; -moz-box-flex: $values; -webkit-flex: $values; -ms-flex: $values; flex: $values; } @mixin order($val) { -webkit-box-ordinal-group: $val; -moz-box-ordinal-group: $val; -ms-flex-order: $val; -webkit-order: $val; order: $val; } SCSS
Referências Referências https://css-tricks.com/snippets/css/a-guide-to-flexbox http://www.w3.org/TR/css-flexbox-1/ https://developer.mozilla.org/pt- BR/docs/CSS/Usando_caixas_flexiveis_css http://www.livrosdomaujor.com.br/css3/index.php
Sites uteis Sites uteis http://flexiejs.com/playground/ http://the-echoplex.net/flexyboxes/
Obrigado. Obrigado.