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
280
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
250
Desmistificando a Refatoração - TDC Innovation 2021
rogeralbinoi
1
230
Código Limpo - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
180
Princípios S.O.L.I.D - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
370
Construindo Progressive Web Apps - GDG Mogi Guaçu 2019
rogeralbinoi
1
200
Criando Componentes com ReactJS
rogeralbinoi
0
510
Other Decks in Programming
See All in Programming
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
510
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
480
「10分以内に機能を消せる状態」 の実現のためにやっていること
togishima
1
530
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
180
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.7k
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
0
470
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
190
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
580
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
2k
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
5.7k
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 1
philipschwarz
PRO
0
100
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
14
13k
Featured
See All Featured
How GitHub (no longer) Works
holman
315
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
A better future with KSS
kneath
239
18k
Code Reviewing Like a Champion
maltzj
527
40k
Producing Creativity
orderedlist
PRO
348
40k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Speed Design
sergeychernyshev
33
1.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
GitHub's CSS Performance
jonrohan
1032
470k
Scaling GitHub
holman
464
140k
RailsConf 2023
tenderlove
30
1.3k
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.