[REF] web: backport .text-bg-#{$color} from BS 5.2
Add the new helper `.text-bg-#{$color}` to restore the old behaviour like in
BS4 for the `.bg-#{$color}`
In short, in BS5 `.bg-#{$color}` don't change anymore the text color but
only the background. `.text-bg-#{$color}` change both color text and
background.
Task ID: 2766483
Part-of: odoo/odoo#95450
This commit is contained in:
@@ -327,6 +327,7 @@ This module provides the core of the Odoo Web Client.
|
||||
],
|
||||
'web._assets_bootstrap': [
|
||||
'web/static/src/legacy/scss/import_bootstrap.scss',
|
||||
'web/static/src/libs/bootstrap/helpers_backport.scss',
|
||||
'web/static/src/legacy/scss/bootstrap_review.scss',
|
||||
],
|
||||
'web._assets_backend_helpers': [
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Backport from BS 5.2
|
||||
// TODO remove me when migrate to new Bootstrap 5.2 +
|
||||
|
||||
$prefix: '' !default;
|
||||
$theme-colors: () !default;
|
||||
|
||||
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
|
||||
@each $color, $value in $theme-colors {
|
||||
$color-rgb: to-rgb($value);
|
||||
.text-bg-#{$color} {
|
||||
color: color-contrast($value) !important;
|
||||
background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user