Skip to content

Commit

Permalink
Merge pull request #3853 from nebulab/kennyadsl/remove-deprecated-var…
Browse files Browse the repository at this point in the history
…iables-usage

Remove deprecated sass color-#{state} variables usage
  • Loading branch information
kennyadsl authored Dec 10, 2020
2 parents 9eadf85 + 4bf5d7e commit 3382105
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $secondary: $color-dark-accent !default;
$blue: $color-primary !default;
$red: $color-red !default;
$orange: $color-yellow !default;
$green: $color-success !default;
$green: $color-green !default;

// Body
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
$color-action-success-bg: theme-color-level(success, -10) !default;
$color-action-success-brd: theme-color-level(success, -9) !default;
$color-action-warning-bg: theme-color-level(warning, -10) !default;
$color-action-warning-brd: theme-color-level(warning, -9) !default;
$color-action-danger-bg: theme-color-level(danger, -10) !default;
$color-action-danger-brd: theme-color-level(danger, -9) !default;

$color-action-edit-bg: $color-action-success-bg !default;
$color-action-edit-brd: $color-action-success-brd !default;
$color-action-clone-bg: $color-action-warning-bg !default;
$color-action-clone-brd: $color-action-warning-brd !default;
$color-action-remove-bg: $color-action-danger-bg !default;
$color-action-remove-brd: $color-action-danger-brd !default;
$color-action-void-bg: $color-action-danger-bg !default;
$color-action-void-brd: $color-action-danger-brd !default;
$color-action-cancel-bg: $color-action-warning-bg !default;
$color-action-cancel-brd: $color-action-warning-brd !default;
$color-action-capture-bg: $color-action-success-bg !default;
$color-action-capture-brd: $color-action-success-brd !default;
$color-action-save-bg: $color-action-success-bg !default;
$color-action-save-brd: $color-action-success-brd !default;
$color-action-mail-bg: $color-action-success-bg !default;
$color-action-mail-brd: $color-action-success-brd !default;
$color-action-failure-bg: $color-action-danger-bg !default;
$color-action-failure-brd: $color-action-danger-brd !default;

$actions: (
edit,
clone,
remove,
void,
capture,
save,
cancel,
mail,
failure
) !default;

$actions-bg-colors: (
$color-action-edit-bg,
$color-action-clone-bg,
$color-action-remove-bg,
$color-action-void-bg,
$color-action-capture-bg,
$color-action-save-bg,
$color-action-cancel-bg,
$color-action-mail-bg,
$color-action-failure-bg
) !default;

$actions-brd-colors: (
$color-action-edit-brd,
$color-action-clone-brd,
$color-action-remove-brd,
$color-action-void-brd,
$color-action-capture-brd,
$color-action-save-brd,
$color-action-cancel-brd,
$color-action-mail-brd,
$color-action-failure-brd
) !default;

table tbody tr {
&.highlight {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
color: $body-color;

&.notice {
background-color: rgba(lighten($color-notice, 15), .95);
border-top-color: $color-notice;
background-color: rgba(theme-color-level(warning, -8), .95);
border-top-color: theme-color(warning);
}
&.success {
background-color: rgba(lighten($color-success, 30), .95);
border-top-color: $color-success;
background-color: rgba(theme-color-level(success, -10), .95);
border-top-color: theme-color(success);
}
&.error {
background-color: rgba(lighten($color-error, 30), .95);
border-top-color: $color-error;
background-color: rgba(theme-color-level(danger, -8), .95);
border-top-color: theme-color(danger);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $output-solidus-deprecation-warnings: true !default;
@if $output-solidus-deprecation-warnings == true {
@if global-variable-exists($variable) {
@warn "[Solidus] [Deprecation] `$#{$variable}` is deprecated and will be " +
"removed in 3.0.0. Please use Bootstraps $#{$replacement} instead";
"removed in 3.0.0. Please use Bootstraps #{$replacement} instead";
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ $color-tab-active-bg: $color-white !default;
$color-tab-active-border: $color-white !default;

// Basic flash colors
@include bs-deprecated-variable("color-success", "brand-success");
@include bs-deprecated-variable("color-success", "theme-color(success)");
$color-success: $color-green !default;
@include bs-deprecated-variable("color-notice", "brand-warning");
@include bs-deprecated-variable("color-notice", "theme-color(warning)");
$color-notice: $color-yellow !default;
@include bs-deprecated-variable("color-error", "brand-danger");
@include bs-deprecated-variable("color-error", "theme-color(danger)");
$color-error: $color-red !default;

// Breadcrumb custom variable
Expand Down Expand Up @@ -113,26 +113,6 @@ $color-pill-warning-text: $color-pill-text;
$color-pill-error: #ff967b;
$color-pill-error-text: $color-pill-text;

// Actions colors
$color-action-edit-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-edit-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-clone-bg: lighten($color-notice, (5 * 5) ) !default;
$color-action-clone-brd: lighten($color-notice, (15 * 5) ) !default;
$color-action-remove-bg: lighten($color-error, (5 * 5) ) !default;
$color-action-remove-brd: lighten($color-error, (10 * 5) ) !default;
$color-action-void-bg: lighten($color-error, (10 * 5) ) !default;
$color-action-void-brd: lighten($color-error, (20 * 5) ) !default;
$color-action-cancel-bg: lighten($color-notice, (10 * 5) ) !default;
$color-action-cancel-brd: lighten($color-notice, (20 * 5) ) !default;
$color-action-capture-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-capture-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-save-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-save-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-mail-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-mail-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-failure-bg: lighten($color-error, (10 * 5) ) !default;
$color-action-failure-brd: lighten($color-error, (20 * 5) ) !default;

// Available states
$states: (
active,
Expand Down Expand Up @@ -160,11 +140,6 @@ $states: (
void
) !default;

// Available actions
$actions: edit, clone, remove, void, capture, save, cancel, mail, failure !default;
$actions-bg-colors: $color-action-edit-bg, $color-action-clone-bg, $color-action-remove-bg, $color-action-void-bg, $color-action-capture-bg, $color-action-save-bg, $color-action-cancel-bg, $color-action-mail-bg, $color-action-failure-bg !default;
$actions-brd-colors: $color-action-edit-brd, $color-action-clone-brd, $color-action-remove-brd, $color-action-void-brd, $color-action-capture-brd, $color-action-save-brd, $color-action-cancel-brd, $color-action-mail-brd, $color-action-failure-brd !default;

// Sidebar
//--------------------------------------------------------------
$width-sidebar: 200px !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ colors = [
used_for: 'Buttons primary actions, links, active states.'
},
{
name: '$color-success',
name: 'theme-color(success)',
value: '#52B73B',
used_for: 'Success actions.'
},
{
name: '$color-error',
name: 'theme-color(danger)',
value: '#CE452A',
used_for: 'Errors, destructive action warnings.'
},
{
name: '$color-notice',
name: 'theme-color(warning)',
value: '#FFDD59',
used_for: 'Warnings actions.'
}
Expand Down

0 comments on commit 3382105

Please sign in to comment.