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
63
Get start with react-test-library.
simoneas02
0
56
ES6 and Beyond pdf
simoneas02
0
180
Montando layouts em um mini game
simoneas02
2
250
Experiência na China Simone e Willany pareando <3
simoneas02
0
82
Front-end na vida real
simoneas02
0
210
It's me!!
simoneas02
0
97
Montando layouts em um mini game chamado Browser
simoneas02
1
200
It's me!!
simoneas02
0
260
Other Decks in Technology
See All in Technology
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
240
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
170
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
190
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
180
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
150
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.1k
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Done Done
chrislema
186
16k
Writing Fast Ruby
sferik
630
62k
Building the Perfect Custom Keyboard
takai
2
680
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Code Reviewing Like a Champion
maltzj
527
40k
Skip the Path - Find Your Career Trail
mkilby
0
54
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
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