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
CSS in JS in action
Search
Ngalam Backend Community
June 26, 2020
Technology
0
59
CSS in JS in action
CSS in JS in action - Fahmi Idris - Frontend Engineer at Kata.ai
Ngalam Backend Community
June 26, 2020
Tweet
Share
More Decks by Ngalam Backend Community
See All by Ngalam Backend Community
Web_Scraping_with_Scrapy.pdf
ngalambackend
0
84
Introduction to Flask
ngalambackend
0
180
Achieving API Performance and Scalability
ngalambackend
0
91
Interfaces in Go
ngalambackend
0
62
Productive Remote Working with Scrum
ngalambackend
0
99
Covid Tracker Kota Malang
ngalambackend
0
71
Supercharge Local Development with Docker
ngalambackend
1
130
Building Scalable and Flexible API by Leveraging GraphQL and BigTable
ngalambackend
1
330
Software 2.0 With Go
ngalambackend
1
63
Other Decks in Technology
See All in Technology
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
tarappo
4
370
脳が溶けた話 / Melted Brain
keisuke69
1
1k
君はジョシュアツリーを知っているか?名前をつけて事象を正しく認識しよう / Do you know Joshua Tree?
ykanoh
4
130
VSCode中心だった自分がターミナル沼に入門した話
sanogemaru
0
670
Phase06_ClaudeCode実践
overflowinc
0
2k
Phase07_実務適用
overflowinc
0
1.9k
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
310
Phase12_総括_自走化
overflowinc
0
1.5k
Phase09_自動化_仕組み化
overflowinc
0
1.7k
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
180
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
6
2.4k
「捨てる」を設計する
kubell_hr
0
250
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
220
Scaling GitHub
holman
464
140k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
280
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Writing Fast Ruby
sferik
630
63k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
So, you think you're a good person
axbom
PRO
2
2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Navigating Weather and Climate Data
rabernat
0
150
The Spectacular Lies of Maps
axbom
PRO
1
650
Done Done
chrislema
186
16k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Transcript
CSS in JS Fahmi Idris - Frontend Engineer
who am i? Fahmi Idris ·
[email protected]
- Frontend Engineer
@ Kata.ai - FIFA Gamer (FIFA Ultimate Team)
what is CSS? • CSS stands for Cascading Style Sheets
• CSS describes how HTML elements are to be displayed
CSS syntax example <style> body { margin: 0; text-align: center;
} h1 { color: blue; font-size: 12px; } p { font-size: 20px; } </style>
CSS preprocessor CSS preprocessor is a program that lets you
generate CSS from the preprocessor's own unique syntax.
CSS preprocessor example
SASS syntax example $font-stack: Helvetica, sans-serif; $primary-color: #333; body {
font: 100% $font-stack; color: $primary-color; ul { margin: 0; padding: 0; list-style: none; } }
CSS in JS “CSS-in-JS” refers to a pattern where CSS
is composed using JavaScript instead of defined in external files.
CSS in JS example
Styled Components utilises tagged template literals to style your components.
It removes the mapping between components and styles.
how it works? • Evaluate the tagged template. • Generate
the new CSS class name. • Preprocess the styles with stylis. • Inject the preprocessed CSS into the page. https://medium.com/styled-components/how-styled-components-works-618a69970421
showcase
example
pros • Local Scoping • Reusability • Dynamic Functionality •
Provides non-CSS features like nesting • No need to think about uniq names for CSS classes
cons • Learning Curve • Extra Layer of Complexity •
Code Readability
CSS in JS list https://github.com/MicheleBertoli/css-in-js
thanks