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
120
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
230
Código Limpo (Clean Code) - FATEC DevDay 2021
rogeralbinoi
1
98
Desmistificando a Refatoração - TDC Innovation 2021
rogeralbinoi
1
120
Código Limpo - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
72
Princípios S.O.L.I.D - DevDay Fatec Mogi Mirim 2019
rogeralbinoi
1
190
Construindo Progressive Web Apps - GDG Mogi Guaçu 2019
rogeralbinoi
1
92
Criando Componentes com ReactJS
rogeralbinoi
0
270
Other Decks in Programming
See All in Programming
Enhancing Applications with Accessibility API
kishikawakatsumi
3
1k
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
1.8k
LPIXEL×CADDi_kaerururu
kaerururu
3
300
CircleCIを活用して AWSへの継続的デリバリーを 実践する
coconala_engineer
1
110
ここ1~2年くらいで 使えるようになった(主要ブラウザーの最新版 がすべて対応した ) ウェブの新機能について ランダムに喋る!
myzkyy
9
6.5k
Data Contracts In Practice With Debezium and Apache Flink (Kafka Summit London)
gunnarmorling
2
280
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
1.1k
CSRF対策のやり方、そろそろアップデートしませんか / Update your knowledge of CSRF protection
hiro_y
25
15k
TCAの Shared Stateって どういう仕組みになってんの?
yimajo
0
330
Dockerで始めるAWS Lambda開発
stutkhd0709
14
2.5k
ファイル先頭の use の意味、説明できますか? 〜PHP の namespace と autoloading の関係を正しく理解しよう〜 / namespace and autoloading in php
okashoi
2
470
自作ソフト(VMagicMirror)がVRMA対応してる話+実装のTips
bakudreameater
0
110
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
24
2.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
RailsConf 2023
tenderlove
0
510
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
Documentation Writing (for coders)
carmenintech
59
3.8k
GraphQLの誤解/rethinking-graphql
sonatard
48
9.1k
Happy Clients
brianwarren
91
6.3k
The Art of Programming - Codeland 2020
erikaheidi
40
12k
Automating Front-end Workflow
addyosmani
1353
200k
Building Your Own Lightsaber
phodgson
97
5.6k
The Invisible Side of Design
smashingmag
293
49k
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.