From ab3d664ce08bd1a7e2c86f0c337ffa4651517257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 7 Jul 2014 17:46:32 +0200 Subject: [PATCH] BUGFIX: share alert styling with mobile --- app/assets/stylesheets/common/base/alert.scss | 45 ++++++++++++++++++ app/assets/stylesheets/desktop.scss | 1 + app/assets/stylesheets/desktop/alert.scss | 3 ++ app/assets/stylesheets/desktop/discourse.scss | 47 ------------------- app/assets/stylesheets/mobile.scss | 1 + app/assets/stylesheets/mobile/alert.scss | 3 ++ app/assets/stylesheets/mobile/discourse.scss | 2 - 7 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 app/assets/stylesheets/common/base/alert.scss create mode 100644 app/assets/stylesheets/desktop/alert.scss create mode 100644 app/assets/stylesheets/mobile/alert.scss diff --git a/app/assets/stylesheets/common/base/alert.scss b/app/assets/stylesheets/common/base/alert.scss new file mode 100644 index 000000000..35646cbf8 --- /dev/null +++ b/app/assets/stylesheets/common/base/alert.scss @@ -0,0 +1,45 @@ +.alert { + padding: 8px 35px 8px 14px; + background-color: scale-color($danger, $lightness: 75%); + color: #c09853; + + .close { + position: relative; + top: -2px; + right: -21px; + line-height: 18px; + float: right; + font-size: 20px; + font-weight: bold; + line-height: 18px; + color: $primary; + opacity: 0.2; + filter: alpha(opacity = 20); + @include hover { + color: $primary; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity = 40); + } + } + button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + } + &.alert-success { + background-color: scale-color($success, $lightness: 90%); + color: $success; + } + &.alert-error { + background-color: scale-color($danger, $lightness: 75%); + color: $danger; + } + &.alert-info { + background-color: scale-color($tertiary, $lightness: 90%); + color: $primary; + } +} diff --git a/app/assets/stylesheets/desktop.scss b/app/assets/stylesheets/desktop.scss index 238ac9ed9..87b0c662a 100644 --- a/app/assets/stylesheets/desktop.scss +++ b/app/assets/stylesheets/desktop.scss @@ -2,6 +2,7 @@ /* @import "desktop/*"; TODO: get this working again */ +@import "desktop/alert"; @import "desktop/compose"; @import "desktop/discourse"; @import "desktop/header"; diff --git a/app/assets/stylesheets/desktop/alert.scss b/app/assets/stylesheets/desktop/alert.scss new file mode 100644 index 000000000..eead66319 --- /dev/null +++ b/app/assets/stylesheets/desktop/alert.scss @@ -0,0 +1,3 @@ +.alert { + margin-bottom: 15px; +} diff --git a/app/assets/stylesheets/desktop/discourse.scss b/app/assets/stylesheets/desktop/discourse.scss index d9088c939..d9accea9e 100644 --- a/app/assets/stylesheets/desktop/discourse.scss +++ b/app/assets/stylesheets/desktop/discourse.scss @@ -475,53 +475,6 @@ body { } } - .alert { - padding: 8px 35px 8px 14px; - margin-bottom: 18px; - background-color: scale-color($danger, $lightness: 75%); - color: #c09853; - - .close { - position: relative; - top: -2px; - right: -21px; - line-height: 18px; - float: right; - font-size: 20px; - font-weight: bold; - line-height: 18px; - color: $primary; - opacity: 0.2; - filter: alpha(opacity = 20); - @include hover { - color: $primary; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity = 40); - } - } - button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; - } - &.alert-success { - background-color: scale-color($success, $lightness: 90%); - color: $success; - } - &.alert-error { - background-color: scale-color($danger, $lightness: 75%); - color: $danger; - } - &.alert-info { - background-color: scale-color($tertiary, $lightness: 90%); - color: $primary; - } - } - .bootbox.modal { .modal-footer { a.btn-primary { diff --git a/app/assets/stylesheets/mobile.scss b/app/assets/stylesheets/mobile.scss index 6a0a5597e..3abcfc294 100644 --- a/app/assets/stylesheets/mobile.scss +++ b/app/assets/stylesheets/mobile.scss @@ -2,6 +2,7 @@ /* @import "mobile/*"; TODO: get this working again */ +@import "mobile/alert"; @import "mobile/compose"; @import "mobile/discourse"; @import "mobile/faqs"; diff --git a/app/assets/stylesheets/mobile/alert.scss b/app/assets/stylesheets/mobile/alert.scss new file mode 100644 index 000000000..f30d98382 --- /dev/null +++ b/app/assets/stylesheets/mobile/alert.scss @@ -0,0 +1,3 @@ +.alert { + margin: 15px 0 5px 0; +} diff --git a/app/assets/stylesheets/mobile/discourse.scss b/app/assets/stylesheets/mobile/discourse.scss index 3ec1a1714..2bf4341f6 100644 --- a/app/assets/stylesheets/mobile/discourse.scss +++ b/app/assets/stylesheets/mobile/discourse.scss @@ -72,8 +72,6 @@ body { } } } - - } blockquote {