Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
59
Get start with react-test-library.
simoneas02
0
54
ES6 and Beyond pdf
simoneas02
0
170
Montando layouts em um mini game
simoneas02
2
250
Experiência na China Simone e Willany pareando <3
simoneas02
0
78
Front-end na vida real
simoneas02
0
210
It's me!!
simoneas02
0
96
Montando layouts em um mini game chamado Browser
simoneas02
1
190
It's me!!
simoneas02
0
250
Other Decks in Technology
See All in Technology
IaC を使いたくないけどポリシー管理をどうにかしたい
kazzpapa3
1
200
DDD x Microservice Architecture : Findy Architecture Conf 2025
syobochim
13
7.2k
私のRails開発環境
yahonda
0
170
Claude Code はじめてガイド -1時間で学べるAI駆動開発の基本と実践-
oikon48
30
16k
都市スケールAR制作で気をつけること
segur
0
210
変わるもの、変わらないもの :OSSアーキテクチャで実現する持続可能なシステム
gree_tech
PRO
0
1.4k
事業状況で変化する最適解。進化し続ける開発組織とアーキテクチャ
caddi_eng
1
9.5k
メッセージ駆動が可能にする結合の最適化
j5ik2o
9
1.8k
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
13
8.7k
機械学習を「社会実装」するということ 2025年冬版 / Social Implementation of Machine Learning November 2025 Version
moepy_stats
4
1.5k
【ASW21-02】STAMP/CAST分析における生成AIの支援 ~羽田空港航空機衝突事故を題材として (Support of Generative AI in STAMP/CAST Analysis - A Case Study Based on the Haneda Airport Aircraft Accident -)
hianraku9498
2
470
Capture Checking / Separation Checking 入門
tanishiking
0
110
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
690
Automating Front-end Workflow
addyosmani
1371
200k
How STYLIGHT went responsive
nonsquared
100
5.9k
Facilitating Awesome Meetings
lara
57
6.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Typedesign – Prime Four
hannesfritz
42
2.9k
KATA
mclloyd
PRO
32
15k
Speed Design
sergeychernyshev
33
1.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Why Our Code Smells
bkeepers
PRO
340
57k
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