Created
March 16, 2010 03:44
-
-
Save bangpound/333621 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import __base.sass | |
!zen_first_sidebar_width ||= 210px | |
!zen_second_sidebar_width ||= 210px | |
!zen_content_width ||= 519px | |
!zen_gutter ||= 10px | |
!zen_navigation_height ||= 1.5em | |
!zen_page_width ||= !zen_first_sidebar_width + !zen_content_width + !zen_second_sidebar_width | |
=zen-region-visibility | |
overflow: visible | |
// A very nice CSS3 property | |
word-wrap: break-word | |
// | |
!width = width of the region | |
!first_margin = first with respect to reading direction. | |
- LTR = left margin | |
- RTL = right margin | |
!first = the first side with respect to reading direction | |
- LTR = left | |
- RTL = right | |
=zen-region(!width, !first_margin = 0, !first = "left") | |
!second = "right" | |
@if !first == "right" | |
!second = "left" | |
//+reset-box-model | |
+float(!first) | |
width = !width | |
margin: | |
#{!first} = !first_margin | |
#{!second} = - (!width + !first_margin) | |
// The !width and !first_margin arguments are blueprint units. | |
// The !content argument indicates whether the #content region is part of the | |
// width of the region or the margin. | |
=zen-blueprint-region(!width, !content = "no", !first_margin = 0, !first = "left") | |
@if !content == "width" | |
+zen-region((!width * !blueprint_grid_outer_width) - !blueprint_grid_margin, !first_margin * !blueprint_grid_outer_width, !first) | |
@else if !content == "margin" | |
+zen-region(!width * !blueprint_grid_outer_width, (!first_margin * !blueprint_grid_outer_width) - !blueprint_grid_margin, !first) | |
@else | |
+zen-region(!width * !blueprint_grid_outer_width, !first_margin * !blueprint_grid_outer_width, !first) | |
=zen-blueprint-layout(!content_units = 24, !first_sidebar = 0, !second_sidebar = 0) | |
#content | |
+zen-blueprint-region(!content_units, "width", !first_sidebar) | |
.region-sidebar-first | |
+zen-blueprint-region(!first_sidebar) | |
.region-sidebar-second | |
+zen-blueprint-region(!second_sidebar, "margin", !first_sidebar + !content_units) | |
& .with-navigation | |
#content,.region-sidebar-first,.region-sidebar-second | |
margin-top = !zen_navigation_height | |
=zen-blueprint-layout-rtl(!content_units = 24, !first_sidebar = 0, !second_sidebar = 0) | |
#content | |
+zen-blueprint-region(!content_units, "width", !first_sidebar, "right") | |
.region-sidebar-first | |
+zen-blueprint-region(!first_sidebar, "no", 0, "right") | |
.region-sidebar-second | |
+zen-blueprint-region(!second_sidebar, "margin", !first_sidebar + !content_units, "right") | |
& .with-navigation | |
#content,.region-sidebar-first,.region-sidebar-second | |
margin-top = !zen_navigation_height |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment