Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
80
Introduction to Flask
ngalambackend
0
170
Achieving API Performance and Scalability
ngalambackend
0
87
Interfaces in Go
ngalambackend
0
57
Productive Remote Working with Scrum
ngalambackend
0
92
Covid Tracker Kota Malang
ngalambackend
0
67
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
57
Other Decks in Technology
See All in Technology
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
160
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
1
730
Lookerで実現するセキュアな外部データ提供
zozotech
PRO
0
140
AWSを使う上で最低限知っておきたいセキュリティ研修を社内で実施した話 ~みんなでやるセキュリティ~
maimyyym
2
1.5k
MapKitとオープンデータで実現する地図情報の拡張と可視化
zozotech
PRO
1
140
ChatGPTで論⽂は読めるのか
spatial_ai_network
9
29k
Database イノベーショントークを振り返る/reinvent-2025-database-innovation-talk-recap
emiki
0
190
RAG/Agent開発のアップデートまとめ
taka0709
0
180
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
150
評価駆動開発で不確実性を制御する - MLflow 3が支えるエージェント開発
databricksjapan
1
200
SREには開発組織全体で向き合う
koh_naga
0
340
Databricks向けJupyter Kernelでデータサイエンティストの開発環境をAI-Readyにする / Data+AI World Tour Tokyo After Party
genda
1
130
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
A better future with KSS
kneath
240
18k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Docker and Python
trallard
47
3.7k
Agile that works and the tools we love
rasmusluckow
331
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Facilitating Awesome Meetings
lara
57
6.7k
Balancing Empowerment & Direction
lara
5
800
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
730
Rails Girls Zürich Keynote
gr2m
95
14k
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