Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply our gentler color theming to Alert stylings #22

Merged
merged 2 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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