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
HowAboutWe for Couples Views & Styles Patterns
Search
Rebecca Miller-Webster
March 27, 2013
Programming
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HowAboutWe for Couples Views & Styles Patterns
in Rails
Rebecca Miller-Webster
March 27, 2013
More Decks by Rebecca Miller-Webster
See All by Rebecca Miller-Webster
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
360
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.6k
Trust and Teams: GORUCO 2017
rmw
0
300
Becoming an Engineer Leader Panel Intro Slide
rmw
0
370
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
1k
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
560
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
980
Tech Talk 101: Topic Generation
rmw
0
450
Other Decks in Programming
See All in Programming
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
700
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
530
JavaDoc 再入門
nagise
1
360
A2UI という光を覗いてみる
satohjohn
1
140
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
170
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
270
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
200
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
190
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
Inside Stream API
skrb
1
720
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
690
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
220
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
Abbi's Birthday
coloredviolet
2
8.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
Mobile First: as difficult as doing things right
swwweet
225
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
The Limits of Empathy - UXLibs8
cassininazir
1
360
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Transcript
Overview of Couples Views/Styles HowAboutWe Server 1 pointer March 26,
2013
• logic in views is harder to test • views
are difficult to reason about Problem: Our Views are messy WTF is happening here??
Fix #0: SASS and View Styleguide! https://github.com/howaboutwe/sass-style-guide
NOT DESIGN Markup is about content
None
Use SASS THE GOOD PARTS
None
Variables are your friend
Mixin it up ... WITH
Decorators & Helpers WHEN SHIT GETS COMPLICATED
Decorators Logic moves with the OBJECT Helpers Logic moves with
the VIEW
Move logic out of views When • if statements •
ternary • lots of states • It hurts my head Then Generate in (testable) code • Classes • Copy • Html attributes
This
TO
How?
Generate classes
Move classes up
None
Generate Copy
Encapsulate repetition in partials Sometimes zero Sometimes one Sometimes two
None
Generate html attributes From TO WITH
Our current pattern • Use & enforce styleguide for SASS
& views • Markup is about content not design • Use SASS ◦ variables ◦ mixins • Move classes up & design changes to CSS • Use decorators (or helpers) to: ◦ Generate classes ◦ Generate copy ◦ Generate HTML attributes