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
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
220
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
230
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.5k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
510
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
110
Vite+ Unified Toolchain for the Web
naokihaba
0
290
Claspは野良GASの夢をみるか
takter00
0
190
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Navigating Weather and Climate Data
rabernat
0
220
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
610
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
140
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
It's Worth the Effort
3n
188
29k
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.