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
Variáveis Nativas com CSS
Search
Simone Amorim
February 11, 2017
Technology
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Variáveis Nativas com CSS
Variáveis Nativas com CSS x Variáveis em pre-processadores
Simone Amorim
February 11, 2017
More Decks by Simone Amorim
See All by Simone Amorim
A Inclusão de Mulheres no Mercado de Tecnologia
simoneas02
0
77
Get start with react-test-library.
simoneas02
0
75
ES6 and Beyond pdf
simoneas02
0
210
Montando layouts em um mini game
simoneas02
2
280
Experiência na China Simone e Willany pareando <3
simoneas02
0
94
Front-end na vida real
simoneas02
0
230
It's me!!
simoneas02
0
130
Montando layouts em um mini game chamado Browser
simoneas02
1
220
It's me!!
simoneas02
0
280
Other Decks in Technology
See All in Technology
ダッシュボード"開発"について 〜使われるダッシュボードのつくりかた〜
kimichan
0
230
iOS/Androidの二刀流エンジニアがFlutter & TypeScriptへ越境後の現在地 - Flutterがメインになって見えた景色と現在の醍醐味 / Dual-Platform Mobile Engineer Shifts to Flutter & TypeScript - The View and Real Thrill of Going Flutter-First
bitkey
PRO
0
100
AI_Dev_Day_製造業領域でのAI活用から見た活用の罠と成功に導く実践知.pdf
kintotechdev
0
230
「休む」重要さ
smt7174
7
1.7k
AI時代のPlaywright活用(システムテストを自動化する ー 実行エンジンにPla ywrightを選んだ理由)
ynisqa1988
2
1k
AI時代こそ、スケールしないことをしよう -「作る人」から「なぜ作るか」を考える人へ / Do Things That Don't Scale in the AI Era — From How to Why
kaminashi
1
160
Git 研修【MIXI 26新卒技術研修】#2
mixi_engineers
PRO
1
260
Webの技術とガジェットで子どもも大人も楽しめるワクワク体験を提供する / Qiita Tech Festa Day 2026
you
PRO
1
290
A Bag-of-Documents Model for Query Specificity
dtunkelang
0
110
「待ち時間」の消滅と「自我消耗」の加速:生成AI時代のエンジニアを救うメンタル・リソース管理
poropinai1966
0
200
AI研修(Day2)【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
770
AI研修(Day1)【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
1.3k
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
290
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
270
Designing for humans not robots
tammielis
254
26k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
420
Done Done
chrislema
186
16k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Transcript
A long time ago in a galaxy far far away…
Revenge of the Platform
I'm Simone Amorim, mother and studing for become a Front-End
Developer and CSS Evangelist <3 I love running and ride a bike! @simoneas02
http://www.w3.org/TR/css-variables/ CSS Custom Properties for Cascading Variables Module Level 1
Basics
Declare the Custom Properties .luke { --color: #000; --size: 200px;
}
Use with var() function .luke { --color: #000; --size: 200px;
background-color: var(--color); width: var(-size); height: var(-size); }
None
SCope
.container { --color: #000; } .box { background-color: var(—cor); }
// Bad <div class=“container”> O choose </div> <div class=“box”> You </div>
.container { --color: #000; } .box { background-color: var(—cor); }
// Good <div class=“container”> <div class=“box”> I choose You </div> </div>
:root { --cor: #000; } .luke { background-color: var(—cor); }
.leia { background-color: var(—cor); } // Good
FALLBACK
Use a second value .yoda { background-color: var(—color, green); width:
var(-size, 10px); height: var(-size, 10px); }
preprocessors x custom properties
Javascript
http://codepen.io/danield770/pen/rxqPOM
Support
http://caniuse.com/#search=variables
None
progressive enhancement
Double property trick .yoda { color: green; color: var(—color, green);
}
None
Para finalizar, o mais importante!
Código é só código, o que realmente importa é o
que o "codar" pode proporcionar para as pessoas que você ama.. “ - Afonso Pacifer
26 days Front-End Study
May the force be with you…
Thanks @simoneas02