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
63
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
95
Introduction to Flask
ngalambackend
0
210
Achieving API Performance and Scalability
ngalambackend
0
100
Interfaces in Go
ngalambackend
0
74
Productive Remote Working with Scrum
ngalambackend
0
110
Covid Tracker Kota Malang
ngalambackend
0
75
Supercharge Local Development with Docker
ngalambackend
1
140
Building Scalable and Flexible API by Leveraging GraphQL and BigTable
ngalambackend
1
340
Software 2.0 With Go
ngalambackend
1
74
Other Decks in Technology
See All in Technology
OpenID for Verifiable Credentials 実装から見えた相互運用性確保までの道のり(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
360
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
460
Dylib Hijacking on macOS: Dead or Alive?
patrickwardle
0
130
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
110
あなたの知らないバージョン命名規則
sat
PRO
2
850
みてねにおけるAI-DLC導入活動とAIドリブン開発の現在地/JAWS-UG AI-DLC #2
isaoshimizu
2
280
現場の暗黙知を継承するAIエージェント — 対話から生まれる長期記憶と Skills
atsukish
0
130
AI時代のデータ基盤を考える問い
pacocat
0
740
hookで自作する Claude Code の「実況ボード」
shinyasaita
2
230
VPCでもFloatingIPを使いたいんだ
y_kotani
1
130
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
エージェント化するAI:現在地とその先に起きる変化 / AI as Agents: The Current State and the Changes Ahead
ks91
PRO
0
160
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
630
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building Adaptive Systems
keathley
44
3.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.5k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
950
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
420
It's Worth the Effort
3n
188
29k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
500
Everyday Curiosity
cassininazir
0
300
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