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
220
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
410
Código Limpo (Clean Code) - FATEC DevDay 2021
rogeralbinoi
1
210
Desmistificando a Refatoração - TDC Innovation 2021
rogeralbinoi
1
200
Código Limpo - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
140
Princípios S.O.L.I.D - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
320
Construindo Progressive Web Apps - GDG Mogi Guaçu 2019
rogeralbinoi
1
150
Criando Componentes com ReactJS
rogeralbinoi
0
430
Other Decks in Programming
See All in Programming
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
2.6k
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
150
PHP で学ぶ OAuth 入門
azuki
1
120
The Weight of Data: Rethinking Cloud-Native Systems for the Age of AI
hollycummins
0
270
Signal-Based Data FetchingWith the New httpResource
manfredsteyer
PRO
0
160
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
480
フロントエンドテストの育て方
quramy
11
2.9k
ミリしらMCP勉強会
watany
4
740
AWSで雰囲気でつくる! VRChatの写真変換ピタゴラスイッチ
anatofuz
0
140
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
0
110
PHPのガベージコレクションを深掘りしよう
rinchoku
0
260
プロダクト横断分析に役立つ、事前集計しないサマリーテーブル設計
hanon52_
2
390
Featured
See All Featured
Statistics for Hackers
jakevdp
798
220k
Thoughts on Productivity
jonyablonski
69
4.6k
Navigating Team Friction
lara
184
15k
Side Projects
sachag
452
42k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Into the Great Unknown - MozCon
thekraken
37
1.7k
The World Runs on Bad Software
bkeepers
PRO
67
11k
RailsConf 2023
tenderlove
30
1.1k
The Cult of Friendly URLs
andyhume
78
6.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
KATA
mclloyd
29
14k
Git: the NoSQL Database
bkeepers
PRO
430
65k
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.