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
72
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
44
Other Decks in Programming
See All in Programming
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Writing documentation can be fun with plugin system
okuramasafumi
0
120
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
30
11k
Immutable ActiveRecord
megane42
0
130
Grafana Cloudとソラカメ
devoc
0
140
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
Rails アプリ地図考 Flush Cut
makicamel
1
110
Formの複雑さに立ち向かう
bmthd
1
720
Introduction to kotlinx.rpc
arawn
0
630
Software Architecture
hschwentner
6
2.1k
Linux && Docker 研修/Linux && Docker training
forrep
23
4.5k
Featured
See All Featured
The Invisible Side of Design
smashingmag
299
50k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Making Projects Easy
brettharned
116
6k
Done Done
chrislema
182
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
8
270
BBQ
matthewcrist
86
9.5k
Become a Pro
speakerdeck
PRO
26
5.1k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
31
2.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Building Adaptive Systems
keathley
40
2.4k
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