sass - Create square divs using susy-grid -


is possible have @include span(3 of 12) return in pixels instead of %?

i'm trying create square elements, , want height of element equal width.

.myelement {   width: span(3 of 12)   height: span(3 of 12) } 

of course causes height %, % of parent container, not equal width! ideas?

not impossible @ — tricky (if want fluid square).

// static width/height simple .square-a {   @include span(2 static);   height: span(2 static); }  // fluid takes bit more work .square-b {   @include span(2);   height: 0;   // %-padding relative parent width   padding-top: span(2);   position: relative;    // inner element positioned fit space   span {     position: absolute;     top: 0;     right: 0;     bottom: 0;     left: 0;   } } 

here's demo of both.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -