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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
530
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
150
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
250
小さなエージェントから始めてみよう!実践コンテキストエンジニアリング
iwamot
PRO
0
130
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
1
630
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
5.8k
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
Terraform 0 to 100:100個以上のリポジトリを常に最新にし続けるための自動化
sue445
2
130
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
210
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
420
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
AIで実装が加速したのに、 なぜ私は仕事の大半で人と話し続けていたのか?
say_no_w
0
190
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
WCS-LA-2024
lcolladotor
0
1k
Un-Boring Meetings
codingconduct
0
500
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing for Performance
lara
612
70k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
310
Agile that works and the tools we love
rasmusluckow
331
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k