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
230
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
420
Código Limpo (Clean Code) - FATEC DevDay 2021
rogeralbinoi
1
210
Desmistificando a Refatoração - TDC Innovation 2021
rogeralbinoi
1
210
Código Limpo - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
150
Princípios S.O.L.I.D - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
330
Construindo Progressive Web Apps - GDG Mogi Guaçu 2019
rogeralbinoi
1
160
Criando Componentes com ReactJS
rogeralbinoi
0
470
Other Decks in Programming
See All in Programming
Design Pressure
hynek
0
1.4k
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
690
データと事例で振り返るDevin導入の"リアル" / The Realities of Devin Reflected in Data and Case Studies
rkaga
3
3.3k
医療系ソフトウェアのAI駆動開発
koukimiura
1
170
tsconfigのオプションで変わる型世界
keisukeikeda
1
110
TSConfigからTypeScriptの世界を覗く
planck16
2
1.2k
REST API設計の実践 – ベストプラクティスとその落とし穴
kentaroutakeda
2
220
primeNumberでのRBS導入の現在 && RBS::Traceでinline RBSを拡充してみた
mnmandahalf
0
160
rbs-traceを使ってWEARで型生成を試してみた After RubyKaigi 2025〜ZOZO、ファインディ、ピクシブ〜 / tried rbs-trace on WEAR
oyamakei
0
440
PT AI без купюр
v0lka
0
140
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
4
420
なぜHono×GraphQLを選んだのか?
junichi_fukushima
0
800
Featured
See All Featured
Building an army of robots
kneath
306
45k
How to Ace a Technical Interview
jacobian
276
23k
Navigating Team Friction
lara
185
15k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
A designer walks into a library…
pauljervisheath
205
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
Become a Pro
speakerdeck
PRO
28
5.3k
Art, The Web, and Tiny UX
lynnandtonic
298
21k
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.