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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Rebecca Miller-Webster
March 27, 2013
Programming
0
79
HowAboutWe for Couples Views & Styles Patterns
in Rails
Rebecca Miller-Webster
March 27, 2013
Tweet
Share
More Decks by Rebecca Miller-Webster
See All by Rebecca Miller-Webster
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Trust & Teams: 2019 Chicago CTO Summit
rmw
2
330
Refactoring Trust on Your Team (CTO Summit 2018)
rmw
1
1.5k
Trust and Teams: GORUCO 2017
rmw
0
270
Becoming an Engineer Leader Panel Intro Slide
rmw
0
330
Frameworks for Feedback (Long version) - 2016 May Self Conference
rmw
2
980
Frameworks for Feedback (2015 May - RailsConf)
rmw
1
530
Frameworks for Feedback - DevOpsDays Chicago
rmw
0
950
Tech Talk 101: Topic Generation
rmw
0
420
Other Decks in Programming
See All in Programming
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
110
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.2k
今から始めるClaude Code超入門
448jp
8
8.9k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Data-Centric Kaggle
isax1015
2
780
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
30 Presentation Tips
portentint
PRO
1
220
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
130
ラッコキーワード サービス紹介資料
rakko
1
2.3M
A Tale of Four Properties
chriscoyier
162
24k
Speed Design
sergeychernyshev
33
1.5k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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