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
70
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
42
Other Decks in Programming
See All in Programming
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
3
3.2k
gopls を改造したら開発生産性が高まった
satorunooshie
8
230
offers_20241022_imakiire.pdf
imakurusu
2
340
CSC509 Lecture 07
javiergs
PRO
0
140
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
370
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
540
CSC509 Lecture 08
javiergs
PRO
0
100
WEBエンジニア向けAI活用入門
sutetotanuki
0
290
僕がつくった48個のWebサービス達
yusukebe
17
16k
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
120
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
280
Typedesign – Prime Four
hannesfritz
39
2.4k
Six Lessons from altMBA
skipperchong
26
3.4k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
363
19k
A designer walks into a library…
pauljervisheath
202
24k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.8k
Unsuck your backbone
ammeep
668
57k
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