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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
76
Get start with react-test-library.
simoneas02
0
73
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
92
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
【セミナー資料】Claude Code をセキュアに使うための考え方と設定の勘どころ / Claude Code Webinar 20260616
masahirokawahara
2
420
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
150
ザ・データベース、MySQL ~ OSC 2026 Sendai ~
sakaik
0
150
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
16
5.5k
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
1.3k
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
130
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
170
Claude Codeをどのように キャッチアップしているか
oikon48
13
8.6k
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
320
Bucharest Tech Week 2026 - Guardians of the Cloud-Native Galaxy
edeandrea
PRO
0
130
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
170
AI駆動開発を通して感じた、 AI時代のデザイナーの役割変化
whisaiyo
4
2.3k
Featured
See All Featured
A Soul's Torment
seathinner
6
3k
Optimizing for Happiness
mojombo
378
71k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
Evolving SEO for Evolving Search Engines
ryanjones
0
220
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
850
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
630
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Making Projects Easy
brettharned
120
6.7k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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