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
Abstand halten – mit custom properties
Search
Gunnar Bittersmann
March 09, 2020
Programming
0
45
Abstand halten – mit custom properties
Lightning talk on the benefits of CSS custom properties over preprocessor variables
Gunnar Bittersmann
March 09, 2020
Tweet
Share
More Decks by Gunnar Bittersmann
See All by Gunnar Bittersmann
Responsive typography 2
gunnarbittersmann
0
91
Go home, Prettifier, you’re drunk!!
gunnarbittersmann
0
67
3 Fehler sind zu finden
gunnarbittersmann
0
110
TIL that the future :has already begun
gunnarbittersmann
0
79
TIL how to clear floats
gunnarbittersmann
0
74
TIL about showModal (from small things big things one day come)
gunnarbittersmann
0
84
Inclusive Design 24 2022 – Gunnar’s picks
gunnarbittersmann
0
74
The color rebeccapurple
gunnarbittersmann
0
110
Mehrsprachige Websites
gunnarbittersmann
0
84
Other Decks in Programming
See All in Programming
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
220
subpath importsで始めるモック生活
10tera
0
310
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
960
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Being A Developer After 40
akosma
87
590k
Optimizing for Happiness
mojombo
376
70k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Transcript
mit CUstom pRopErtieS AbstaNd haLtEn Photo by Tore F on
Unsplash
.a { margin: 2em; @media (min-width: 40em) { margin: 3em;
} @media (min-width: 60em) { margin: 4em; } } .b { margin: 1.5em; @media (min-width: 40em) { margin: 2em; } @media (min-width: 60em) { margin: 2em; } }
.a { margin: $x-s; @media (min-width: 40em) { margin: $x-m;
} @media (min-width: 60em) { margin: $x-l; } } .b { margin: calc($x-s - $y-s); @media (min-width: 40em) { margin: calc($x-m - $y-m); } @media (min-width: 60em) { margin: calc($x-l - $y-l); } } $x-s: 2em; $x-m: 3em; $x-l: 4em; $y-s: 0.5em; $y-m: 1em; $y-l: 2em;
.a { margin: var("--x-s); @media (min-width: 40em) { margin: var("--x-m);
} @media (min-width: 60em) { margin: var("--x-l); } } .b { margin: calc(var("--x-s) - var("--y-s)); @media (min-width: 40em) { margin: calc(var("--x-m) - var("--y-m)); } @media (min-width: 60em) { margin: calc(var("--x-l) - var("--y-l)); } } :root { "--x-s: 2em; "--x-m: 3em; "--x-l: 4em; "--y-s: 0.5em; "--y-m: 1em; "--y-l: 2em; }
.a { margin: var("--x); @media (min-width: 40em) { margin: var("--x);
} @media (min-width: 60em) { margin: var("--x); } } .b { margin: calc(var("--x) - var("--y)); @media (min-width: 40em) { margin: calc(var("--x) - var("--y)); } @media (min-width: 60em) { margin: calc(var("--x) - var("--y)); } } :root { "--x: 2em; @media (min-width: 40em) { "--x: 3em; } @media (min-width: 60em) { "--x: 4em; } "--y: 0.5em; @media (min-width: 40em) { "--y: 1em; } @media (min-width: 60em) { "--y: 2em; } }
.a { margin: var("--x); } .b { margin: calc(var("--x) -
var("--y)); } :root { "--x: 2em; @media (min-width: 40em) { "--x: 3em; } @media (min-width: 60em) { "--x: 4em; } "--y: 0.5em; @media (min-width: 40em) { "--y: 1em; } @media (min-width: 60em) { "--y: 2em; } }
.a { margin: var("--x); } .b { margin: calc(var("--x) -
var("--y)); } :root { "--x: 2em; "--y: 0.5em; @media (min-width: 40em) { "--x: 3em; "--y: 1em; } @media (min-width: 60em) { "--x: 4em; "--y: 2em; } }
.a { margin: 2em; margin: var("--x); } .b { margin:
1.5em; margin: calc(var("--x) - var("--y)); } :root { "--x: 2em; "--y: 0.5em; @media (min-width: 40em) { "--x: 3em; "--y: 1em; } @media (min-width: 60em) { "--x: 4em; "--y: 2em; } }
.a { margin: 4em; margin: var("--x); } .b { margin:
2em; margin: calc(var("--x) - var("--y)); } :root { "--x: 4em; "--y: 2em; @media (max-width: 40em) { "--x: 3em; "--y: 1em; } @media (max-width: 60em) { "--x: 2em; "--y: 0.5em; } }
LiebedOriS Ulrike Rausch, LiebeFonts Photo by Tore F on Unsplash
Fira sans/Mon0 Erik Spiekermann et al.