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
440
Código Limpo (Clean Code) - FATEC DevDay 2021
rogeralbinoi
1
230
Desmistificando a Refatoração - TDC Innovation 2021
rogeralbinoi
1
220
Código Limpo - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
160
Princípios S.O.L.I.D - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
350
Construindo Progressive Web Apps - GDG Mogi Guaçu 2019
rogeralbinoi
1
180
Criando Componentes com ReactJS
rogeralbinoi
0
490
Other Decks in Programming
See All in Programming
リバースエンジニアリング新時代へ! GhidraとClaude DesktopをMCPで繋ぐ/findy202507
tkmru
7
1.7k
kiroでゲームを作ってみた
iriikeita
0
140
[Codecon - 2025] Como não odiar seus testes
camilacampos
0
100
なぜあなたのオブザーバビリティ導入は頓挫するのか
ryota_hnk
5
570
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
36
11k
知って得する@cloudflare_vite-pluginのあれこれ
chimame
1
140
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
670
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
320
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
150
React は次の10年を生き残れるか:3つのトレンドから考える
oukayuka
41
16k
AI Ramen Fight
yusukebe
0
130
リッチエディターを安全に開発・運用するために
unachang113
1
350
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.7k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Statistics for Hackers
jakevdp
799
220k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
Code Reviewing Like a Champion
maltzj
524
40k
Practical Orchestrator
shlominoach
190
11k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
880
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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.