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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
86
Introduction to Flask
ngalambackend
0
190
Achieving API Performance and Scalability
ngalambackend
0
93
Interfaces in Go
ngalambackend
0
63
Productive Remote Working with Scrum
ngalambackend
0
100
Covid Tracker Kota Malang
ngalambackend
0
73
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
64
Other Decks in Technology
See All in Technology
OWASP APTSを眺めてみた
su3158
0
130
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
210
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
350
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
160
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8k
Databricks Academic Series 〜 大規模言語モデル / エージェント編 〜 / academic-series-llm
databricksjapan
0
120
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
190
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (前半)
oracle4engineer
PRO
2
240
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
300
AI時代の品質はテストプロセスの作り直し #scrumniigata
kyonmm
PRO
4
1.4k
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
180
色を視る
yuzneri
0
320
Featured
See All Featured
BBQ
matthewcrist
89
10k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
190
エンジニアに許された特別な時間の終わり
watany
106
240k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The Limits of Empathy - UXLibs8
cassininazir
1
320
Claude Code のすすめ
schroneko
67
220k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
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