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
2
180
Flexible grids using Sass
A talk on grid design philosophy and using singularity grid system
Vinay Raghu
March 27, 2014
Tweet
Share
More Decks by Vinay Raghu
See All by Vinay Raghu
Content is a beast - a content-first approach to building wordpress websites
rvinay88
0
78
Lean UX: Designing successful apps
rvinay88
0
46
How to build a fully functioning app with Polymer and Firebase
rvinay88
0
110
The art of UI animation
rvinay88
2
320
Flexible grids using Sass
rvinay88
1
200
Other Decks in Technology
See All in Technology
Datachain会社紹介資料(2024年11月) / Company Deck
datachain
4
17k
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
1
410
ライブラリでしかお目にかかれない珍しい実装
mikanichinose
2
330
Microsoft MVPになる前、なってから/Fukuoka_Tech_Women_Community_1_baba
nina01
0
170
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
130
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
1
270
Railsで4GBのデカ動画ファイルのアップロードと配信、どう実現する?
asflash8
1
210
私はこうやってマインドマップでテストすることを出す!
mineo_matsuya
0
220
製造現場のデジタル化における課題とPLC Data to Cloudによる新しいアプローチ
hamadakoji
0
210
AIチャットボット開発への生成AI活用
ryomrt
0
140
Intuneお役立ちツールのご紹介
sukank
3
750
AI長期記憶システム構築のための LLMマルチエージェントの取り組み / Awarefy-LLM-Multi-Agent
iktakahiro
2
350
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
168
14k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Code Reviewing Like a Champion
maltzj
520
39k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Facilitating Awesome Meetings
lara
49
6.1k
4 Signs Your Business is Dying
shpigford
180
21k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Automating Front-end Workflow
addyosmani
1366
200k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
Speed Design
sergeychernyshev
24
600
Faster Mobile Websites
deanohume
305
30k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
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