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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
73
Get start with react-test-library.
simoneas02
0
68
ES6 and Beyond pdf
simoneas02
0
200
Montando layouts em um mini game
simoneas02
2
270
Experiência na China Simone e Willany pareando <3
simoneas02
0
90
Front-end na vida real
simoneas02
0
220
It's me!!
simoneas02
0
120
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
実践 TanStack Start ― 新規プロダクトを開発して確立した、サーバーとクライアント境界の設計パターン / Practical TanStack Start Server-Client Boundary Patterns
kaminashi
1
110
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
1
570
10サービス以上のメール到達率改善を地道に継続的に進めている話 / Continue to improve email delivery rates across multiple services
yamaguchitk333
6
2.2k
サイボウズ、プラットフォームエンジニアリング始めるってよ ― プラットフォームチームの事業貢献と組織アラインメントの強化
ueokande
0
120
AI-Assisted Contributions and Maintainer Load - PyCon US 2026
pauloxnet
1
180
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
600
React Compiler導入から21ヶ月、いま始めるならこうやる
astatsuya
2
270
2026-05-14 要件定義からソース管理まで!IBM Bob基礎ハンズオン
yutanonaka
0
170
Loadbalancing exporter internals
ymotongpoo
1
110
The Bag-of-Documents Model for Query Understanding and Retrieval
dtunkelang
0
170
Vibe teaching — Python training in the age of AI (PyCon US 2026, Education Summit)
reuven
0
100
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
500
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Producing Creativity
orderedlist
PRO
348
40k
HDC tutorial
michielstock
2
660
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
550
Between Models and Reality
mayunak
4
290
WCS-LA-2024
lcolladotor
0
590
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
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