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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ngalam Backend Community
June 26, 2020
Technology
72
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
100
Introduction to Flask
ngalambackend
0
210
Achieving API Performance and Scalability
ngalambackend
0
100
Interfaces in Go
ngalambackend
0
110
Productive Remote Working with Scrum
ngalambackend
0
110
Covid Tracker Kota Malang
ngalambackend
0
76
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
80
Other Decks in Technology
See All in Technology
Ebitengine製iOSアプリ公開ボタンを押す会
eiei114
0
110
Content Mapper APIの応用例~CSS Modules、言語ファイル~
uhyo
2
630
仕様と現実の間で落とし所を探るリモートMCPの認証・認可 — Sansanの認証基盤における課題と実践
sansantech
PRO
2
230
「AIチャットからもできないの?」と言われたら ~業務アプリをMCP対応するときの認証・認可の勘所
oidfj
0
280
An Introduction to Context Ontology Accelerator (teaching AI agents what your data means)
inariku
PRO
1
200
GCASアップデート(202607-202610)
techniczna
1
250
bpf_arenaとstruct_opsを使うのが難しかった話
masu_mi
0
220
HQ駆動開発で最高のAI-Contextを作ろう
sansantech
PRO
1
120
Kiro を使うコツ (頼み方、覚えさせ方、任せ方) | 目指せ Kiro マスター 09
inariku
PRO
3
120
続・ソフトウェアアーキテクトのための意思決定術: Decision Readiness, Revisited — When AI Changes the Economics of Software Architecture
snoozer05
PRO
9
2.8k
cdkd (CDK Direct)
gotok365
4
280
新米を「売り越さない」、Aurora DSQLで作る在庫ゼロ死守の限定ドロップEC
yama3133
0
200
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
First, design no harm
axbom
PRO
2
1.4k
Technical Leadership for Architectural Decision Making
baasie
3
640
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
670
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
820
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
Producing Creativity
orderedlist
PRO
348
41k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
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