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
1
120
Variáveis Nativas com CSS
Variáveis Nativas com CSS x Variáveis em pre-processadores
Simone Amorim
February 11, 2017
Tweet
Share
More Decks by Simone Amorim
See All by Simone Amorim
A Inclusão de Mulheres no Mercado de Tecnologia
simoneas02
0
67
Get start with react-test-library.
simoneas02
0
62
ES6 and Beyond pdf
simoneas02
0
190
Montando layouts em um mini game
simoneas02
2
260
Experiência na China Simone e Willany pareando <3
simoneas02
0
87
Front-end na vida real
simoneas02
0
220
It's me!!
simoneas02
0
100
Montando layouts em um mini game chamado Browser
simoneas02
1
210
It's me!!
simoneas02
0
260
Other Decks in Technology
See All in Technology
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
280
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
OpenClawでPM業務を自動化
knishioka
1
310
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
380
MIX AUDIO EN BROADCAST
ralpherick
0
120
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
120
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
110
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
2k
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
590
AIエージェント×GitHubで実現するQAナレッジの資産化と業務活用 / QA Knowledge as Assets with AI Agents & GitHub
tknw_hitsuji
0
280
Change Calendarで今はOK?を仕組みにする
tommy0124
1
130
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to make the Groovebox
asonas
2
2k
Site-Speed That Sticks
csswizardry
13
1.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
490
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
130
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
310
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
82
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