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
59
0
Share
CSS in JS in action
CSS in JS in action - Fahmi Idris - Frontend Engineer at Kata.ai
Ngalam Backend Community
June 26, 2020
More Decks by Ngalam Backend Community
See All by Ngalam Backend Community
Web_Scraping_with_Scrapy.pdf
ngalambackend
0
85
Introduction to Flask
ngalambackend
0
180
Achieving API Performance and Scalability
ngalambackend
0
91
Interfaces in Go
ngalambackend
0
63
Productive Remote Working with Scrum
ngalambackend
0
100
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
BigQuery × dbtでコスト削減した話
rightcode
0
140
QGISプラグイン CMChangeDetector
naokimuroki
1
280
終盤で崩壊させないAI駆動開発
j5ik2o
2
2.1k
インフラを Excel 管理していた組織が 3 ヶ月で IaC 化されるまで
geekplus_tech
3
190
DevOpsDays2026 Tokyo Cross-border practices to connect "safety" and "DX" in healthcare
hokkai7go
0
160
EarthCopilotに学ぶマルチエージェントオーケストレーション
nakasho
0
210
申請待ちゼロへ!AWS × Entra IDで実現した「権限付与」のセルフサービス化
mhrtech
2
320
Digitization部 紹介資料
sansan33
PRO
1
7.3k
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
1
350
猫でもわかるKiro CLI(CDKコーディング編)
kentapapa
1
110
【Findy FDE登壇_2026_04_14】— 現場課題を本気で解いてたら、FDEになってた話
miyatakoji
0
1.1k
職能の壁を取り払った先で見えた壁 -AI時代のクロスファンクショナル組織-
shimotaroo
1
100
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
130
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The browser strikes back
jonoalderson
0
950
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