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
170
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
74
Lean UX: Designing successful apps
rvinay88
0
41
How to build a fully functioning app with Polymer and Firebase
rvinay88
0
97
The art of UI animation
rvinay88
2
310
Flexible grids using Sass
rvinay88
1
200
Other Decks in Technology
See All in Technology
Janus
bkuhlmann
1
490
Compose Compiler Metricsを使った実践的なコードレビュー
tomorrowkey
1
210
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
27
5.7k
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
160
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
190
2024/4/26 コンピュータ歴史博物館解説告知
toshi_atsumi
0
210
SPI原点回帰論:事業課題とFour Keysの結節点を見出す実践的ソフトウェアプロセス改善 / DevOpsDays Tokyo 2024
visional_engineering_and_design
4
1.9k
MLOpsの「壁」を乗り越える、LINEヤフーの Data Quality as Code
lycorptech_jp
PRO
3
140
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
340
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
130
VS CodeでAWSを操作しよう
smt7174
7
1.6k
Google Cloud Next '24でブログを10本書いた方法と勉強会を沸かせた方法
yasumuusan
0
250
Featured
See All Featured
Optimizing for Happiness
mojombo
370
69k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
16
1.4k
Art, The Web, and Tiny UX
lynnandtonic
288
19k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Bootstrapping a Software Product
garrettdimon
PRO
301
110k
No one is an island. Learnings from fostering a developers community.
thoeni
15
2.1k
Atom: Resistance is Futile
akmur
258
25k
Code Reviewing Like a Champion
maltzj
513
39k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
243
20k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Embracing the Ebb and Flow
colly
79
4.1k
The Pragmatic Product Professional
lauravandoore
24
5.8k
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