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
Somewhat Stylish
Search
Dominic Barker
November 03, 2014
Programming
65
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Somewhat Stylish
Dominic Barker
November 03, 2014
More Decks by Dominic Barker
See All by Dominic Barker
Introduction to functional programming with Javascript
dakuan
0
60
Atomic Architecture
dakuan
3
180
Model, View, Whatever.
dakuan
0
130
Other Decks in Programming
See All in Programming
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.6k
MySQLとPostgreSQLって何が違うの?
akagami
0
130
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
590
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
420
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
280
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
140
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
290
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.9k
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
140
Dockerfile CMD for Node.js
grazie1999
0
110
What's New in Android 2026
veronikapj
0
270
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
530
New Earth Scene 8
popppiees
3
2.5k
Thoughts on Productivity
jonyablonski
76
5.3k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
470
Scaling GitHub
holman
464
140k
Producing Creativity
orderedlist
PRO
348
40k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
500
Believing is Seeing
oripsolob
1
200
Technical Leadership for Architectural Decision Making
baasie
3
520
The Language of Interfaces
destraynor
162
27k
Transcript
Somewhat Stylish
CSS is crap • Terrible language generally. • Specificity is
confusing. • Big files, 80% of which isn’t even used on any particular page. • LESS / SASS help some things, but make others worse.
Solution
Store CSS in Javascript { button: {
background-‐color: 'red', border-‐radius: '2px' } }
Use React.js mixin /** * @jsx React.DOM */
var React = require('react'), ClassToStyleMixin = require('class-‐to-‐style'); var Button = React.createClass({ mixins: [ClassToStyleMixin] render: function() { return ( <a className={styles.button}> {this.props.text} </a> ); } }); module.exports = Button;
Compiled HTML <a style="background-‐color:red;border-‐radius:2px;"> Click me! </a>
Good • No more Stylesheets. • Fine grained control over
element’s styles. • Faster browser perfomance. • Only have what you need.
Not good • Uses inline styles. • Larger page size.
• Lots of duplication. • More complex.