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
How I Style Sheet
Search
Gregory McIntyre
February 18, 2014
Programming
1
73
How I Style Sheet
Tips on CSS and pointers to some best practices and guides
Gregory McIntyre
February 18, 2014
Tweet
Share
More Decks by Gregory McIntyre
See All by Gregory McIntyre
The Job Dance
puyo
0
45
Other Decks in Programming
See All in Programming
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
MUSUBIXとは
nahisaho
0
130
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AI巻き込み型コードレビューのススメ
nealle
1
210
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Oxlint JS plugins
kazupon
1
930
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
710
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Paper Plane (Part 1)
katiecoart
PRO
0
4.2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Building a Scalable Design System with Sketch
lauravandoore
463
34k
A Soul's Torment
seathinner
5
2.3k
Odyssey Design
rkendrick25
PRO
1
490
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Transcript
How I Style Sheet @gregmcintyre 2014
Ye Bad Olde Dayz
Repeated Values
Related Values
Repeated Selectors
Vendor Prefixes
Does Not Convey Intent
Cross Browser Pain
Specificity Wars
SASS (with Compass) ☑ DRY Values ☑ Calculate Values On-the-Fly
☑ DRY Selectors ☑ DRY Vendor Prefixes ☑ Convey Intent ☑ Cross Browser Compatibility
DRY Repeated Values
Calculate Values
DRYs Selectors
DRY Vendor Prefixes
Convey Intent
Cross Browserify
.scss or .sass ? Backwards compatibility with CSS Style rules
on one line Looks like vomit
Ye Bad Newe Dayz
CSS is First Class Code Good naming Separation of concerns
Code reviews Refactoring Bugs, verification, regressions
Good Code = Easy to Change Verifiable Reveals Intent DRY
Concise
None
Split Concerns
“OO” CSS
Twitter Bootstrap
Zurb Foundation
OOCSS Benefits Project scalability Browser render speed
SMACSS
SMACSS Style Layers Baseline Layout Modules States
Baseline CSS
Layout CSS
Module CSS
State CSS
Mixins or OOCSS?
Semantics
Level of Abstraction
Do I Need Strict Content Semantics? Different and wildly different
themes all at the same time? User edited markup? CMS?
SASS+OOCSS+SMACSS DRY selectors DRY values DRY media queries (@content) DRY
vendor prefixes (Compass) Minimise amount of code Fast render speed Conventions Clear intent
Good luck out there @gregmcintyre 2014