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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
340
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
660
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
120
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
110
Webフレームワークの ベンチマークについて
yusukebe
0
160
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
730
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
890
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
Featured
See All Featured
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
A Soul's Torment
seathinner
6
2.9k
Statistics for Hackers
jakevdp
799
230k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Abbi's Birthday
coloredviolet
2
8k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Automating Front-end Workflow
addyosmani
1370
210k
How STYLIGHT went responsive
nonsquared
100
6.2k
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.