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
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
70
Get start with react-test-library.
simoneas02
0
64
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
AI와 협업하는 조직으로의 여정
arawn
0
230
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
140
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
390
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
410
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
390
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
MLOps導入のための組織作りの第一歩
akasan
0
320
Data Hubグループ 紹介資料
sansan33
PRO
0
2.9k
ARIA Notifyについて
ryokatsuse
1
120
AI バイブコーティングでキーボード不要?!
samakada
0
530
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
110
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
890
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Abbi's Birthday
coloredviolet
2
7.1k
Crafting Experiences
bethany
1
110
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
270
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Raft: Consensus for Rubyists
vanstee
141
7.4k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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