JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
stylus cleanup
authorJason Woofenden <jason@jasonwoof.com>
Tue, 23 Feb 2016 22:05:39 +0000 (17:05 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Tue, 23 Feb 2016 22:05:39 +0000 (17:05 -0500)
inc/wfpl
style.styl

index de9d8d4..faffdde 160000 (submodule)
--- a/inc/wfpl
+++ b/inc/wfpl
@@ -1 +1 @@
-Subproject commit de9d8d4999bf24e255e583bf69bc4d1a530af2df
+Subproject commit faffdde4b15b98d545f487f783da89aca8190a4e
index 22fccb6..c0071a2 100644 (file)
@@ -39,29 +39,38 @@ columns = wfpl_columns({
                                float: left
                                width: centerer_width - sidebar_width - sidebar_gap
                        },
+                       gap: {
+                               type: 'node'
+                               width: sidebar_gap
+                       }
                        sidebar: {
                                type: 'alternatives'
                                plain: {
                                        type: 'node'
-                                       margin-left: sidebar_gap
-                                       width: sidebar_width
-                                       float: left
+                                       outer_width: sidebar_width
+                                       float: right
                                },
                                bordered: {
                                        type: 'node'
-                                       margin-left: sidebar_gap
                                        border-width: 1px
                                        border-style: solid
                                        border-color: red
                                        padding: 15px
-                                       width: sidebar_width - 2px - 30px
-                                       float: left
+                                       outer_width: sidebar_width
+                                       float: right
                                }
                        }
                }
        }
 })
 
+// the gap is used for checking the width calculations, but has no dom element.
+// This space is left blank (by floating main to the left and sidebar to the
+// right) and might save the layout if there are borders (which don't scale) or
+// rounding errors
+remove(columns['css'], '.centerer.with_sidebar > .sidebar.gap')
+remove(columns['responsive_css'], '.centerer.with_sidebar > .sidebar.gap')
+
 biggest_content_width = columns['widths']['.centerer.full > .main']
 
 hide_in_one_column_mode = {
@@ -70,6 +79,7 @@ hide_in_one_column_mode = {
 }
 
 // fonts
+line_height = 1.2
 font_size_large = 18px
 font_size_normal = 15px
 font_size_small = 13px
@@ -206,6 +216,7 @@ body
        background: window_bg
        color: content_fg
        font: font_size_normal Arimo, Arial, sans-serif
+       line-height: line_height
 
 // call this for each ckeditor on each page
 ckeditor_elements_already = {}
@@ -234,10 +245,9 @@ ckeditor('admin_pages', 'sidebar_content', 'content_with_sidebar_sidebar_plain',
 ckeditor('admin_pages', 'sidebar_content', 'content_with_sidebar_sidebar_bordered', columns['widths']['.centerer.with_sidebar > .sidebar.bordered'])
 
 body > .centerer > .nav
-       padding-bottom: 20px
        ul
                li_reset()
-               space_evenly()
+               space_evenly(line_height)
 
 footer
        clear: both
@@ -270,6 +280,7 @@ footer
 
 
 #admin_links
+       font-size: font_size_small
        background: #fdd
        padding: 3px
        margin-bottom: 15px
@@ -424,13 +435,6 @@ body > .centerer
        body > .centerer
                width: auto
 
-       // make sure that borders (which won't scale) and rounding errors don't
-       // break the layout
-       body > .centerer.full > .main,
-       body > .centerer.with_sidebar > .sidebar.plain,
-       body > .centerer.with_sidebar > .sidebar.bordered
-               margin-right: -10px
-
        // big left/right images
        for selector, css in columns.css
                if columns['widths'][selector] > runaround_max
@@ -452,15 +456,17 @@ body
        for selector, css in columns.css
                body > {selector}
                        if selector == '.centerer'
-                               margin-top: 0
+                               // margin-top: 0
                        else if selector in hide_in_one_column_mode
                                display: none
                        else
                                border: none
                                float: none
                                width: auto
-                               margin: 0
-                               padding: 0
+                               margin-left: 0
+                               margin-right: 0
+                               padding-left: 0
+                               padding-right: 0
                                margin-top: columns['responsive_css']['.centerer']['margin']
 
                                // make image sizing act like it's the "full"/only column
@@ -480,7 +486,7 @@ wfpl_li_ri_to_ci(selector, width)
                        margin-right: auto
                        margin-left: auto
 
-// convert left/right to centered when columns width <= runaround_max
+// convert left/right images to centered when columns width <= runaround_max
 for selector, css in columns.css
        if columns['widths'][selector] > runaround_max
                // calculate screen width when column width is runaround_max
@@ -493,6 +499,8 @@ for selector, css in columns.css
 #mobile_menu_check
        display: none;
 @media screen and (max-width: (mobile_menu_width))
+       body nav.nav > form
+               margin-top: 0
        #mobile_menu_check:not(:checked) + div
                display: none
        #mobile_menu_check:checked + div
@@ -537,4 +545,4 @@ for selector, css in columns.css
 #admin_images_body .th_toggle_buttons
        font-weight: normal
        color: #777
-       space_evenly()
+       space_evenly(line_height)