From c016a081f1a29fed3781eca5372a07ebaafe3b73 Mon Sep 17 00:00:00 2001 From: Kris Aubuchon Date: Mon, 28 Oct 2013 13:46:59 -0400 Subject: [PATCH] further simplification over all, changes include: flatter button style, styling admin table, topic-list style --- .../stylesheets/common/admin/admin_base.scss | 10 ++++ .../common/components/buttons.css.scss | 47 +++++++++---------- .../stylesheets/desktop/topic-post.scss | 21 +++++++-- 3 files changed, 48 insertions(+), 30 deletions(-) diff --git a/app/assets/stylesheets/common/admin/admin_base.scss b/app/assets/stylesheets/common/admin/admin_base.scss index 19c86a13e14..7ed5e07b6b9 100644 --- a/app/assets/stylesheets/common/admin/admin_base.scss +++ b/app/assets/stylesheets/common/admin/admin_base.scss @@ -4,6 +4,16 @@ @import "common/foundation/helpers"; + + +.admin-contents table { +width: 100%; +tr {text-align: left;} +td, th {padding: 8px;} +th {border-top: 1px solid #ddd;} +td {border-bottom: 1px solid #ddd; border-top: 1px solid #ddd;} +} + .content-list li a span.count { font-size: 12px; float: right; diff --git a/app/assets/stylesheets/common/components/buttons.css.scss b/app/assets/stylesheets/common/components/buttons.css.scss index 819abf4c348..298e996584d 100644 --- a/app/assets/stylesheets/common/components/buttons.css.scss +++ b/app/assets/stylesheets/common/components/buttons.css.scss @@ -47,17 +47,18 @@ button { border: none; color: #534d4b; font-weight: normal; - background: #ddd; + background: #e8e8e8; &[href] { color: $btn-default-color; } - &:hover, - &:focus { - background: #888; + &:hover + { + background: #aaa; color: #fff; } &:active { - margin-top: 1px; margin-bottom: -1px; + @include linear-gradient( darken(#aaa, 8%), #aaa); + @include box-shadow(inset 0 1px 3px rgba($black, 0.2)); } &[disabled] { @include linear-gradient($white, $btn-default-background-color); @@ -77,10 +78,10 @@ button { .btn-primary { border: none; color: $white; - font-weight: bold; + font-weight: normal; - color: darken(#e4f2f8, 35%); - background: #e4f2f8; + color: #fff; + background: $btn-primary-background-color; @@ -89,14 +90,15 @@ button { &[href] { color: $white; } - &:hover, - &:focus { - color: darken(#e4f2f8, 45%); - background: darken(#e4f2f8, 10%); + &:hover + { + color: #fff; + background: darken($btn-primary-background-color, 12%); } &:active { - @include linear-gradient($btn-primary-background-color-dark, $btn-primary-background-color); + @include linear-gradient(darken($btn-primary-background-color, 18%), darken($btn-primary-background-color, 12%)); @include box-shadow(inset 0 1px 3px rgba($black, 0.2)); + color: #fff; } &[disabled] { text-shadow: 0 1px 0 rgba($black, 0.2); @@ -109,28 +111,21 @@ button { // -------------------------------------------------- .btn-danger { - border: 1px solid $btn-danger-border-color; color: $white; - text-shadow: 0 1px 0 rgba($black, 0.2); - font-weight: bold; - @include linear-gradient($btn-danger-background-color, $btn-danger-background-color-dark); - @include box-shadow((inset 0 1px 0 rgba($white, 0.33), inset 0 -1px 2px rgba($black, 0.2))); + font-weight: normal; + background: $btn-danger-background-color; &[href] { color: $white; } - &:hover, - &:focus { - @include linear-gradient($btn-danger-background-color, $btn-danger-background-color-light); - @include box-shadow(inset 0 1px 0 rgba($white, 0.33)); + &:hover{ + background: $btn-danger-background-color-dark; } &:active { - @include linear-gradient($btn-danger-background-color-dark, $btn-danger-background-color); + @include linear-gradient($btn-primary-background-color-dark, $btn-primary-background-color); @include box-shadow(inset 0 1px 3px rgba($black, 0.2)); } &[disabled] { - text-shadow: 0 1px 0 rgba($black, 0.2); - @include linear-gradient($btn-danger-background-color, $btn-danger-background-color-dark); - @include box-shadow((inset 0 1px 0 rgba($white, 0.33), inset 0 -1px 2px rgba($black, 0.2))); + } } diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scss index 2355b8019f8..1b3f46dab19 100644 --- a/app/assets/stylesheets/desktop/topic-post.scss +++ b/app/assets/stylesheets/desktop/topic-post.scss @@ -1,4 +1,5 @@ @import "common/foundation/variables"; +@import "common/foundation/mixins"; .container { @@ -113,6 +114,12 @@ nav.post-controls { background: darken(#e4f2f8, 10%); } + &:active { + @include linear-gradient(darken(#e4f2f8, 15%), darken(#e4f2f8, 10%)); + @include box-shadow(inset 0 1px 3px rgba($black, 0.2)); + + } + } @@ -137,9 +144,11 @@ nav.post-controls { } - &:active {margin-top: 1px; margin-bottom: -1px;} &:active { + + @include box-shadow(inset 0 1px 3px rgba($black, 0.2)); + } &.hidden { display: none; @@ -344,6 +353,13 @@ a.star { border-bottom: 1px solid #ccc; } + + &:active { + + + @include box-shadow(inset 0 1px 3px rgba($black, 0.2)); + } + &.collapsed { border-bottom: 0; padding-bottom: 1px; @@ -566,13 +582,10 @@ h1, h2, h3 {margin: 10px 0;} #show-topic-admin { - color: #7b7b7b; right: 20px; padding: 5px 8px; margin-top: 5px; - - }