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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
210
終盤で崩壊させないAI駆動開発
j5ik2o
2
2.1k
2026年に相応しい 最先端プラグインホストの設計<del>と実装</del>
atsushieno
0
120
みんなの「データ活用」を支えるストレージ担当から持ち込むAWS活用/コミュニティー設計TIPS 10選~「作れる」より、「続けられる」設計へ~
yoshiki0705
0
190
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
390
明日からドヤれる!超マニアックなAWSセキュリティTips10連発 / 10 Ultra-Niche AWS Security Tips
yuj1osm
0
480
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
DevOpsDays Tokyo 2026 見えない開発現場を、見える投資に変える
rojoudotcom
3
200
マルチエージェント × ハーネスエンジニアリング × GitLab Duo Agent Platformで実現する「AIエージェントに仕事をさせる時代へ。」 / 20260421 GitLab Duo Agent Platform
n11sh1
0
100
DevOpsDays2026 Tokyo Cross-border practices to connect "safety" and "DX" in healthcare
hokkai7go
0
160
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
240
こんなアーキテクチャ図はいやだ / Anti-pattern in AWS Architecture Diagrams
naospon
1
370
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
330
Making Projects Easy
brettharned
120
6.6k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
260
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Building Applications with DynamoDB
mza
96
7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Crafting Experiences
bethany
1
110
For a Future-Friendly Web
brad_frost
183
10k
Done Done
chrislema
186
16k
Tell your own story through comics
letsgokoyo
1
890
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