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
61
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
AWS CDK「読めるけど書けない」を脱却するファーストステップ
smt7174
3
190
A Casual Introduction to RISC-V
omasanori
0
390
visionOS 開発向けの MCP / Skills をつくり続けることで XR の探究と学習を最大化
karad
1
820
夢の無限スパゲッティ製造機 #phperkaigi
o0h
PRO
0
160
最強のAIエージェントを諦めたら品質が上がった話 / how quality improved after giving up on the strongest AI agent
kt2mikan
0
200
AI実装による「レビューボトルネック」を解消する仕様駆動開発(SDD)/ ai-sdd-review-bottleneck
rakus_dev
0
160
実践 Datadog MCP Server
nulabinc
PRO
2
240
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
180
【Λ(らむだ)】最近のアプデ情報 / RPALT20260318
lambda
0
100
The_Evolution_of_Bits_AI_SRE.pdf
nulabinc
PRO
0
240
2026年もソフトウェアサプライチェーンのリスクに立ち向かうために / Product Security Square #3
flatt_security
1
670
OSC仙台プレ勉強会 AlmaLinuxとは
koedoyoshida
0
190
Featured
See All Featured
Marketing to machines
jonoalderson
1
5k
Everyday Curiosity
cassininazir
0
170
Designing Powerful Visuals for Engaging Learning
tmiket
0
290
The Curse of the Amulet
leimatthew05
1
10k
Code Reviewing Like a Champion
maltzj
528
40k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Producing Creativity
orderedlist
PRO
348
40k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
110
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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