diff --git a/addons/web/__manifest__.py b/addons/web/__manifest__.py index dd987e3851f..d9bb32f49c4 100644 --- a/addons/web/__manifest__.py +++ b/addons/web/__manifest__.py @@ -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': [ diff --git a/addons/web/static/src/libs/bootstrap/helpers_backport.scss b/addons/web/static/src/libs/bootstrap/helpers_backport.scss new file mode 100644 index 00000000000..5be62d05c0d --- /dev/null +++ b/addons/web/static/src/libs/bootstrap/helpers_backport.scss @@ -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; + } +}