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
Flexible grids using Sass
Search
Vinay Raghu
March 27, 2014
Technology
220
2
Share
Flexible grids using Sass
A talk on grid design philosophy and using singularity grid system
Vinay Raghu
March 27, 2014
More Decks by Vinay Raghu
See All by Vinay Raghu
Content is a beast - a content-first approach to building wordpress websites
rvinay88
0
84
Lean UX: Designing successful apps
rvinay88
0
50
How to build a fully functioning app with Polymer and Firebase
rvinay88
0
120
The art of UI animation
rvinay88
2
340
Flexible grids using Sass
rvinay88
1
210
Other Decks in Technology
See All in Technology
How to install a gem
indirect
0
2k
FastMCP OAuth Proxy with Cognito
hironobuiga
3
230
AI時代のシステム開発者の仕事_20260328
sengtor
0
320
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
1
140
OPENLOGI Company Profile for engineer
hr01
1
61k
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
77k
RGBに陥らないために -プロダクトの価値を届けるまで-
righttouch
PRO
0
130
DMBOKを使ってレバレジーズのデータマネジメントを評価した
leveragestech
0
490
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
130
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
210
遊びで始めたNew Relic MCP、気づいたらChatOpsなオブザーバビリティボットができてました/From New Relic MCP to a ChatOps Observability Bot
aeonpeople
1
120
MCPで決済に楽にする
mu7889yoon
0
160
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
240
How to Talk to Developers About Accessibility
jct
2
170
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
140
Skip the Path - Find Your Career Trail
mkilby
1
93
Become a Pro
speakerdeck
PRO
31
5.9k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Transcript
Vinay Raghu / @rvinay88 / viii.in
None
<div class=”small-11 small-centered medium-8 medium-uncentered large-6 large-uncentered hide-for-xl hide- for-xxl”></div>
• Separation of concerns <div class=”small-11 small-centered medium-8 medium-uncentered large-6
large-uncentered hide-for-xl hide- for-xxl”></div> <div class=“sidebar-primary”></div>
http://www.flickr.com/photos/shankbone/2821569368/
• 5 grids • xs, sm, md, lg, xl •
5786 loc • CSS minified 98kb • JS minified 29kb
• 3 grids • small, medium, large • 6372 loc
• CSS minified 146kb • JS minified 86kb
• Abstraction • Responsive • Nestable • Source ordering –
push and pull
• <<Designing in the browser>> • Generic • Symmetric •
2 columns? 12? 16? 24?
None
http://alistapart.com/d/392/content-out-layout/Fig-5-golden-notes.jpg
<div class=”small-11 small-centered medium-8 medium-uncentered large-6 large-uncentered hide-for-xl hide- for-xxl”></div>
<div class=“sidebar-primary”></div>
• Scalable • Maintainable – 12 columns on small •
Non Performant • Code bloat - Unnecessary styles in your code (grunt-uncss, ucss)
<div class=”small-11 small-centered medium-8 medium-uncentered large-6 large-uncentered hide- for-xl hide-for-xxl”></div>
.custom-row-class { @include grid-row(); .custom-column-class { @include grid-column(12); @media #{$small}
{ @include grid-column(6); } @media #{$medium} { @include grid-column(8); } } }
.tab-container{ @extend .large-6; @extend .medium-8; @extend .small-12; @extend .columns; @extend
.large-centered; @extend .medium-centered; }
Pros • Markup is readable and semantic • Separation of
concerns • SCSS readable Cons • More CSS styles and code • Still shipping unused code
.tab-container{ @extend %large-6; @extend %medium-8; @extend %small-12; @extend %columns; @extend
%large-centered; @extend %medium-centered; }
• Modify core features - http://codepen.io/rvinay88/pen/BeFld?editors=010 • @extend only port
of bootstrap - https://github.com/rvinay88/sass- bootstrap • http://viii.in/oosass-foundation-and-bootstrap/ • Can’t use @media with @extend • Grid becomes unclear • Chaining of selectors - Debugging nightmare
button.disabled, button[disabled], .button.disabled, .disabled.follow-button, .disabled.stats-button, .disabled.btn-wizard, .button[disabled], [disabled].follow-button, [disabled].stats-button, [disabled].btn-wizard
{ //styles here}
• Susy - http://susy.oddbird.net/ • Singularity - http://singularity.gs/ • Jeet
- http://jeetframework.com/ • Zen - http://zengrids.com/ • Gridset App - https://gridsetapp.com
• Website - http://singularity.gs/ • Github - https://github.com/Team-Sass/Singularity • Modular
Scale - http://modularscale.com/ • Tutorial 1 - http://vimeo.com/63509346 • Tutorial 2 - https://www.youtube.com/watch?v=PDbVpyS6jF0
None
• https://github.com/Team-Sass/Singularity/wiki/Spanning-The- Grid#group-context-overrides • https://github.com/Team-Sass/modular-scale • https://gist.github.com/rvinay88/9807303 • http://www.mathsisfun.com/numbers/golden-ratio.html •
http://sassmeister.com/gist/9807303
None