Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Variáveis Nativas com CSS
Search
Simone Amorim
February 11, 2017
Technology
150
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
Transcript
28 slides
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
More Decks by Simone Amorim
See All by Simone Amorim
A Inclusão de Mulheres no Mercado de Tecnologia
simoneas02
0
96
Get start with react-test-library.
simoneas02
0
88
ES6 and Beyond pdf
simoneas02
0
230
Montando layouts em um mini game
simoneas02
2
290
Experiência na China Simone e Willany pareando <3
simoneas02
0
100
Front-end na vida real
simoneas02
0
250
It's me!!
simoneas02
0
140
Montando layouts em um mini game chamado Browser
simoneas02
1
240
It's me!!
simoneas02
0
290
Other Decks in Technology
See All in Technology
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
3
880
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
200
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
180
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
190
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
170
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.8k
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
300
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
400
CloudTrail を推したい
kazzpapa3
1
140
変更差分を読むために環境を整備しよう
pipepasta
1
470
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
2
720
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
780
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
380
Balancing Empowerment & Direction
lara
6
1.4k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
3k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
The Pragmatic Product Professional
lauravandoore
37
7.5k