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
61
Get start with react-test-library.
simoneas02
0
56
ES6 and Beyond pdf
simoneas02
0
180
Montando layouts em um mini game
simoneas02
2
250
Experiência na China Simone e Willany pareando <3
simoneas02
0
82
Front-end na vida real
simoneas02
0
210
It's me!!
simoneas02
0
97
Montando layouts em um mini game chamado Browser
simoneas02
1
200
It's me!!
simoneas02
0
250
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Qiita Bash アドカレ LT #1
okaru
0
190
Models vs Bounded Contexts for Domain Modularizati...
ewolff
0
200
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
250
Java 25に至る道
skrb
3
230
GitHub Copilot CLI 現状確認会議
torumakabe
8
1.7k
たかがボタン、されどボタン ~button要素から深ぼるボタンUIの定義について~ / BuriKaigi 2026
yamanoku
1
280
RALGO : AIを組織に組み込む方法 -アルゴリズム中心組織設計- #RSGT2026 / RALGO: How to Integrate AI into an Organization – Algorithm-Centric Organizational Design
kyonmm
PRO
3
1.4k
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
930
クラウドセキュリティの進化 — AWSの20年を振り返る
kei4eva4
0
120
Kusakabe_面白いダッシュボードの表現方法
ykka
0
300
ALB「証明書上限問題」からの脱却
nishiokashinji
0
210
Featured
See All Featured
Claude Code のすすめ
schroneko
67
210k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Statistics for Hackers
jakevdp
799
230k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
110
The Curious Case for Waylosing
cassininazir
0
210
[SF Ruby Conf 2025] Rails X
palkan
0
710
A better future with KSS
kneath
240
18k
BBQ
matthewcrist
89
10k
RailsConf 2023
tenderlove
30
1.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
190
sira's awesome portfolio website redesign presentation
elsirapls
0
120
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