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
88
Introduction to Flask
ngalambackend
0
190
Achieving API Performance and Scalability
ngalambackend
0
93
Interfaces in Go
ngalambackend
0
64
Productive Remote Working with Scrum
ngalambackend
0
100
Covid Tracker Kota Malang
ngalambackend
0
74
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
66
Other Decks in Technology
See All in Technology
NFLコンペ2026 解法
lycorptech_jp
PRO
0
130
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
150
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
860
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
150
Spring Boot における AOT Cache 活用テクニックと 起動時間改善事例
ntt_dsol_java
0
180
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
650
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
360
Claude code Orchestra
ozakiomumkj
3
820
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
1
650
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
190
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
300
Featured
See All Featured
How to make the Groovebox
asonas
2
2.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Crafting Experiences
bethany
1
160
We Have a Design System, Now What?
morganepeng
55
8.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
320
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
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