Skip to content

Commit

Permalink
Merge pull request #22 from RadiusNetworks/3167-change-alert-styles
Browse files Browse the repository at this point in the history
Apply our gentler color theming to Alert stylings
  • Loading branch information
armahillo authored Mar 23, 2021
2 parents cb0e45c + cef75b4 commit 2a94f43
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
17 changes: 17 additions & 0 deletions app/assets/stylesheets/radius-theme/app/alerts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ $alerts-position: 60px;
$alerts-z-index: 9090;
$alerts-width: 350px;

// Color overrides
.alert-success, .flash.notice {
@include alert-variant($alert-flash-notice-bg, $alert-flash-notice-border, $alert-flash-notice-color);
}

.alert-info, .flash.info {
@include alert-variant($alert-flash-info-bg, $alert-flash-info-border, $alert-flash-info-color);
}

.alert-warning, .flash.warning {
@include alert-variant($alert-flash-warning-bg, $alert-flash-warning-border, $alert-flash-warning-color);
}

.alert-danger, .flash.error {
@include alert-variant($alert-flash-error-bg, $alert-flash-error-border, $alert-flash-error-color);
}

// Message container for positioning

.alerts {
Expand Down
20 changes: 19 additions & 1 deletion app/assets/stylesheets/radius-theme/app/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,26 @@ $modal-sm: 300px;

//== Alerts
//
//## Define alert colors, border radius, and padding.

//## Alert Colors defined using FlashHash keys -- Used in for alerts, form errors, and flashhashes
$alert-flash-notice-color: #468847;
$alert-flash-notice-bg: #dff0d8;
$alert-flash-notice-border: #d6e9c6;

$alert-flash-info-color: #3a87ad;
$alert-flash-info-bg: #d9edf7;
$alert-flash-info-border: #bce8f1;

$alert-flash-warning-color: #c09853;
$alert-flash-warning-bg: #fcf8e3;
$alert-flash-warning-border:#fbeed5;

$alert-flash-error-color: #b94a48;
$alert-flash-error-bg: #f2dede;
$alert-flash-error-border: #eed3d7;

//## Define alert colors, border radius, and padding.
//## These are legacy definitions, preserved in case they are used elsewhere
$alert-padding: 8px;
$alert-border-radius: $border-radius-small;
$alert-link-font-weight: bold;
Expand Down
2 changes: 1 addition & 1 deletion lib/radius/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Radius
module Rails
VERSION = "2.1.0"
VERSION = "2.1.1"
end
end

0 comments on commit 2a94f43

Please sign in to comment.