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
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
24
12k
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
120
データマネジメント戦略Night - 4社のリアルを語る会
ktatsuya
1
240
私がよく使うMCPサーバー3選と社内で安全に活用する方法
kintotechdev
0
100
欠陥分析(ODC分析)における生成AIの活用プロセスと実践事例 / 20260320 Suguru Ishii & Naoki Yamakoshi & Mayu Yoshizawa
shift_evolve
PRO
0
400
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
250
Bref でサービスを運用している話
sgash708
0
190
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
6
2.4k
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
120
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
130
スピンアウト講座01_GitHub管理
overflowinc
0
1.4k
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
120
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
180
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
Writing Fast Ruby
sferik
630
63k
For a Future-Friendly Web
brad_frost
183
10k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
160
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
79
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
91
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
220
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
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