From 0f2686eff7f23a996a2a35f712079ea3ac971cd9 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 18 Jul 2011 15:33:11 -0400 Subject: Refactored layout styles: 1. Now iPad vertical gets a collapsed sidebar with columns 2. Moved sidebar toggler styles from layout to sidebar/base 3. Added body class .sidebar-footer to support an always collapsed sidebar 4. Added $indented-lists (bool) for easily setting list indent preferences 5. Removed no-sidebar checking from sidebar-toggler, handled it through css. --- .themes/classic/sass/partials/_blog.scss | 12 +++--- .themes/classic/sass/partials/_syntax.scss | 3 ++ .themes/classic/sass/partials/sidebar/_base.scss | 50 ++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 7 deletions(-) (limited to '.themes/classic/sass/partials') diff --git a/.themes/classic/sass/partials/_blog.scss b/.themes/classic/sass/partials/_blog.scss index 8894755c..26ad19b4 100644 --- a/.themes/classic/sass/partials/_blog.scss +++ b/.themes/classic/sass/partials/_blog.scss @@ -1,10 +1,6 @@ article { overflow: hidden; padding-top: 1em; - ul, ol { margin-left: 1.4em; } - @media only screen and (min-width: 768px) { - ul, ol { margin-left: 0; } - } header { position: relative; padding-top: 2em; @@ -35,9 +31,9 @@ article { h2 { padding-top: 0.8em; background: $img-border top left repeat-x; - .entry-content &:first-child { padding-top: 0; } - &:first-child { background: none; } } + .entry-content & h2:first-child, header + h2 { padding-top: 0; } + h2:first-child, header + h2 { background: none; } .feature { padding-top: .5em; margin-bottom: 1em; @@ -90,7 +86,9 @@ article { } article + article { - background: $img-border top left repeat-x; + .blog-index & { + background: $img-border top left repeat-x; + } } #content .blog-index { padding: { top: 0; bottom: 0; } diff --git a/.themes/classic/sass/partials/_syntax.scss b/.themes/classic/sass/partials/_syntax.scss index a116cedf..b31e250d 100644 --- a/.themes/classic/sass/partials/_syntax.scss +++ b/.themes/classic/sass/partials/_syntax.scss @@ -175,6 +175,9 @@ pre, .highlight, .gist-highlight { .highlight code { @extend .pre-code; background: #000;} figure[role=code] { + background: none; + padding: 0; + border: 0; margin-bottom: 1.5em; figcaption { position: relative; diff --git a/.themes/classic/sass/partials/sidebar/_base.scss b/.themes/classic/sass/partials/sidebar/_base.scss index 3b238a9b..b07dffac 100644 --- a/.themes/classic/sass/partials/sidebar/_base.scss +++ b/.themes/classic/sass/partials/sidebar/_base.scss @@ -21,6 +21,7 @@ aside[role=sidebar] { } ul { margin-bottom: 0.5em; + margin-left: 0; } li { list-style: none; @@ -47,3 +48,52 @@ aside[role=sidebar] { color: $sidebar-link-color-subdued-hover; } } + +@media only screen and (min-width: 768px) { + .toggle-sidebar { + outline: none; + position: absolute; right: -10px; top: 0; bottom: 0; + display: inline-block; + text-decoration: none; + color: mix($text-color-light, $sidebar-bg); + width: 9px; + cursor: pointer; + &:hover { + background: mix($sidebar-border, $sidebar-bg); + @include background(linear-gradient(left, rgba($sidebar-border, .5), rgba($sidebar-border, 0))); + } + &:after { + position: absolute; right: -11px; top: 0; + width: 20px; + font-size: 1.2em; + line-height: 1.1em; + padding-bottom: .15em; + @include border-bottom-right-radius(.3em); + text-align: center; + background: $main-bg $noise-bg; + border-bottom: 1px solid $sidebar-border; + border-right: 1px solid $sidebar-border; + content: "\00BB"; + text-indent: -1px; + } + .collapse-sidebar & { + text-indent: 0px; + right: -20px; + width: 19px; + &:hover { + background: mix($sidebar-border, $sidebar-bg); + } + &:after { + border-left: 1px solid $sidebar-border; + text-shadow: #fff 0 1px; + content: "\00AB"; + left: 0px; right: 0; + text-align: center; + text-indent: 0; + border: 0; + border-right-width: 0; + background: none; + } + } + } +} -- cgit v1.2.1