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
56
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
81
Introduction to Flask
ngalambackend
0
170
Achieving API Performance and Scalability
ngalambackend
0
87
Interfaces in Go
ngalambackend
0
59
Productive Remote Working with Scrum
ngalambackend
0
95
Covid Tracker Kota Malang
ngalambackend
0
68
Supercharge Local Development with Docker
ngalambackend
1
130
Building Scalable and Flexible API by Leveraging GraphQL and BigTable
ngalambackend
1
320
Software 2.0 With Go
ngalambackend
1
60
Other Decks in Technology
See All in Technology
「リリースファースト」の実感を届けるには 〜停滞するチームに変化を起こすアプローチ〜 #RSGT2026
kintotechdev
0
1k
First-Principles-of-Scrum
hiranabe
4
2.3k
WebDriver BiDi 2025年のふりかえり
yotahada3
1
160
形式手法特論:コンパイラの「正しさ」は証明できるか? #burikaigi / BuriKaigi 2026
ytaka23
17
6.2k
Git Training GitHub
yuhattor
1
100
kintone開発のプラットフォームエンジニアの紹介
cybozuinsideout
PRO
0
540
AIと融ける人間の冒険
pujisi
0
120
Eight Engineering Unit 紹介資料
sansan33
PRO
0
6.3k
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
330
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
7
3.4k
OCI技術資料 : OS管理ハブ 概要
ocise
2
4.1k
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
1
190
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Designing for Timeless Needs
cassininazir
0
120
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
The Language of Interfaces
destraynor
162
26k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
The SEO Collaboration Effect
kristinabergwall1
0
330
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
140
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
We Are The Robots
honzajavorek
0
130
HDC tutorial
michielstock
1
320
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