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
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
76
Get start with react-test-library.
simoneas02
0
73
ES6 and Beyond pdf
simoneas02
0
210
Montando layouts em um mini game
simoneas02
2
280
Experiência na China Simone e Willany pareando <3
simoneas02
0
92
Front-end na vida real
simoneas02
0
230
It's me!!
simoneas02
0
130
Montando layouts em um mini game chamado Browser
simoneas02
1
220
It's me!!
simoneas02
0
280
Other Decks in Technology
See All in Technology
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
10
1.7k
組織における AI-DLC 実践
askul
0
250
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
150
アラート調査向けAIエージェントの本番導入とその後/AI Agents for Alert Investigation: Production Deployment and After
taddy_919
1
310
次世代ランサムウェア対策の考察 / 20260704 Mitsutoshi Matsuo
shift_evolve
PRO
5
1.6k
AWS Summit Japan 2026の振り返りと2027へ向けて / AWS Summit Japan 2026 Recap and Prospects for 2027
kaminashi
1
160
“ID沼入口” - 基本とセキュリティから始める、考え続けるためのID管理技術勉強会 告知&イントロ
ritou
0
360
「勝手に広まる」人気 AI エージェントを爆速で作ろう!(AWS Summit Japan 2026講演資料)
minorun365
PRO
10
2.8k
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
390
はてなのサービス基盤を支える Kubernetes《足腰》
masayoshimaezawa
0
390
テスト設計の本質を改めて考えてみる~生成AIを活用する時代だからこそ、作ったテストの説明性を高めよう~
yamasaki696
1
250
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
210
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
170
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
300
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
500
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