Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
98
Productive Remote Working with Scrum
ngalambackend
0
110
Covid Tracker Kota Malang
ngalambackend
0
75
Supercharge Local Development with Docker
ngalambackend
1
150
Building Scalable and Flexible API by Leveraging GraphQL and BigTable
ngalambackend
1
350
Software 2.0 With Go
ngalambackend
1
76
Other Decks in Technology
See All in Technology
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
1
170
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.2k
JSONataとAWS Step Functionsで目指すRuntimelessな世界
mu7889yoon
0
120
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
140
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
170
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
2k
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
850
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
130
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
1
2.3k
AI時代、データエンジニアが一番おもろい
genshun9
0
650
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
6
2.9k
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
110
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
320
Designing Experiences People Love
moore
143
24k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.8k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
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