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
65
Get start with react-test-library.
simoneas02
0
57
ES6 and Beyond pdf
simoneas02
0
190
Montando layouts em um mini game
simoneas02
2
250
Experiência na China Simone e Willany pareando <3
simoneas02
0
83
Front-end na vida real
simoneas02
0
210
It's me!!
simoneas02
0
98
Montando layouts em um mini game chamado Browser
simoneas02
1
200
It's me!!
simoneas02
0
260
Other Decks in Technology
See All in Technology
Tebiki Engineering Team Deck
tebiki
0
24k
データ民主化のための LLM 活用状況と課題紹介(IVRy の場合)
wxyzzz
2
700
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
250
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
350
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.3k
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
440
Cosmos World Foundation Model Platform for Physical AI
takmin
0
860
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
550
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
190
Technical Leadership for Architectural Decision Making
baasie
1
240
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Mind Mapping
helmedeiros
PRO
0
81
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
A designer walks into a library…
pauljervisheath
210
24k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Marketing to machines
jonoalderson
1
4.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