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
Speedy, solid, semantic layout with Susy
Search
tempertemper
April 02, 2015
Technology
0
130
Speedy, solid, semantic layout with Susy
This talk explains how to use Sass for layout, via the powerful yet light-weight Susy library.
tempertemper
April 02, 2015
Tweet
Share
More Decks by tempertemper
See All by tempertemper
Getting started with manual accessibility testing
tempertemper
0
370
Creating a culture of accessibility
tempertemper
0
130
Accessible form patterns – Sunderland Digital
tempertemper
0
300
Accessible user interface patterns – NUX
tempertemper
4
320
Accessible user interface patterns – Orange Bus
tempertemper
1
100
The Importance of Web Standards
tempertemper
0
190
Other Decks in Technology
See All in Technology
Amazon GuardDuty での脅威検出:脅威検出の実例から学ぶ
kintotechdev
0
100
Serverless Meetup #21
yoshidashingo
1
120
LLM 機能を支える Langfuse / ClickHouse のサーバレス化
yuu26
9
1.5k
2025新卒研修・HTML/CSS #弁護士ドットコム
bengo4com
3
13k
全員が手を動かす組織へ - 生成AIが変えるTVerの開発現場 / everyone-codes-genai-transforms-tver-development
tohae
0
110
ロールが細分化された組織でSREと協働するインフラエンジニアは何をするか? / SRE Lounge #18
kossykinto
0
210
Claude CodeでKiroの仕様駆動開発を実現させるには...
gotalab555
3
980
✨敗北解法コレクション✨〜Expertだった頃に足りなかった知識と技術〜
nanachi
1
670
オブザーバビリティプラットフォーム開発におけるオブザーバビリティとの向き合い / Hatena Engineer Seminar #34 オブザーバビリティの実現と運用編
arthur1
0
370
AWS DDoS攻撃防御の最前線
ryutakondo
1
150
MCP認可の現在地と自律型エージェント対応に向けた課題 / MCP Authorization Today and Challenges to Support Autonomous Agents
yokawasa
5
2.2k
Amazon Bedrock AgentCoreのフロントエンドを探す旅 (Next.js編)
kmiya84377
1
140
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
440
Into the Great Unknown - MozCon
thekraken
40
2k
A Modern Web Designer's Workflow
chriscoyier
695
190k
How STYLIGHT went responsive
nonsquared
100
5.7k
Docker and Python
trallard
45
3.5k
Done Done
chrislema
185
16k
Become a Pro
speakerdeck
PRO
29
5.5k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Transcript
Speedy, solid, semantic layout with Susy
Ordered list of contents 1. Reasons why Susy’s great 2.
Installation 3. Basic usage 4. Advanced usage
Layout woes • Lack of flexibility • Too many dependencies
• DIY is a headache B • Separation of concerns • Jack of all trades
Semantics <div class="col-sm-5 .col-md-6">Content</div> <div class="col-sm-5 .col-sm-offset-2 .col-md-6 .col-md- offset-0">Extra
content</div> <main class="main">Content</main> <aside>Extra content</aside>
Flexibility • 4/6/10/18 column grid? • ‘Breaking’ the grid •
Different grids for different screen-widths • Asymmetric grids
Dependencies • Can slow compilation of CSS • Increases complexity
of a project
Maths
None
Master of one • Keeps codebase light • All (layout)
bases covered
http://susy.oddbird.net/
Installation • Bower • Copy/paste .zip • Ruby Gem •
GUI (Codekit, Prepros, etc.)
Compilers • Compass () • Ruby Sass • Libsass ()
Import Susy @import "susy"; @import "../components/susy/sass/susy"; Or
Grid settings (maps) $susy: ( columns: 4, gutters: .25, math:
fluid, );
Laying out body { @include container(60em); padding-right:.5em; padding-left:.5em; } [role="banner"]
.logo { @include span(2 of 4); } [role="navigation"] { @include span(last 2 of 4); }
Overriding li { @include span(4 of 14); padding-right: .5em; padding-left:
.5em; } article li { float: none; width: auto; margin-right: 0; }
Multiple maps $default: ( columns: 4, gutters: .25, math: fluid,
gutter-position: after, ); $medium: ( columns: 6, gutters: .25, math: fluid, gutter-position: after, ); $large: ( columns: 12, gutters: .25, math: fluid, gutter-position: after, );
Breakpoints • Hand-written alongside layout context • Susy breakpoints •
Breakpoint (http://breakpoint-sass.com/)
[role="banner"] .logo { @include layout($default); @include span(2 of 4); @media
(min-width: 30em) { @include layout($medium); @include span(2 of 6); } } [role="navigation"] { @include layout($default); @include span(last 2 of 4); @media (min-width: 30em) { @include layout($medium); @include span(last 4 of 6); } }
Shorthand article { @include span(8 of 12); img { @include
span(last 4 of 8 before); } }
Gallery .gallery li { @include gallery(4 of 12); }
Loads more • Asymmetric grids • Margins and padding: pre,
post, squish, pull, prefix, suffix, bleed • Using span and gutter as a function, instead of a mixin
susydocs.oddbird.net/en/latest/toolkit/
Remind me… • Keeps markup clean • Flexible • Light-weight
• Straightforward syntax • Does one thing well
@tempertemper