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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Simone Amorim
February 11, 2017
Technology
130
1
Share
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
71
Get start with react-test-library.
simoneas02
0
65
ES6 and Beyond pdf
simoneas02
0
200
Montando layouts em um mini game
simoneas02
2
260
Experiência na China Simone e Willany pareando <3
simoneas02
0
89
Front-end na vida real
simoneas02
0
220
It's me!!
simoneas02
0
110
Montando layouts em um mini game chamado Browser
simoneas02
1
210
It's me!!
simoneas02
0
270
Other Decks in Technology
See All in Technology
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
310
これからの「データマネジメント」の話をしよう
sansantech
PRO
0
150
AI バイブコーティングでキーボード不要?!
samakada
0
620
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
410
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
110
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
400
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
260
Choose your own adventure in agentic design patterns
glaforge
0
150
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
150
AI와 협업하는 조직으로의 여정
arawn
0
510
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
150
小説執筆のハーネスエンジニアリング
yoshitetsu
0
780
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
840
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Skip the Path - Find Your Career Trail
mkilby
1
110
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
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