From 38754b2485c3db9ceea87422b4e66a496885b400 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 17 Aug 2021 10:00:38 +0000 Subject: [PATCH] [FIX] web_editor: properly define background classes before cc classes All background-color classes (bg-XXX) were defined before the color combination classes. Except for the Odoo colors ones (bg-o-color-X) which were defined after. That inconsistency was not a real problem before as those two type of classes could not be combined but this will change in the future. Part of https://github.com/odoo/odoo/pull/73611 task-2599770 --- .../static/src/scss/web_editor.common.scss | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/web_editor/static/src/scss/web_editor.common.scss b/addons/web_editor/static/src/scss/web_editor.common.scss index 034378dbaa4..f973d776b56 100644 --- a/addons/web_editor/static/src/scss/web_editor.common.scss +++ b/addons/web_editor/static/src/scss/web_editor.common.scss @@ -610,6 +610,15 @@ blockquote { font-style: italic; } +// Extend bootstrap to create background and text utilities for some colors +// outside of the $theme-colors too (but not btn-, alert-, etc). +@for $index from 1 through 5 { + $-color-name: 'o-color-#{$index}'; + $-color: color($-color-name); + @include bg-variant(".bg-#{$-color-name}", $-color); + @include text-emphasis-variant(".text-#{$-color-name}", $-color); +} + // Bg/text color classes generation .o_cc { #{$o-color-extras-nesting-selector} { @@ -748,15 +757,6 @@ blockquote { } } -// Extend bootstrap to create background and text utilities for some colors -// outside of the $theme-colors too (but not btn-, alert-, etc). -@for $index from 1 through 5 { - $-color-name: 'o-color-#{$index}'; - $-color: color($-color-name); - @include bg-variant(".bg-#{$-color-name}", $-color); - @include text-emphasis-variant(".text-#{$-color-name}", $-color); -} - // Base snippet rules %o-we-background-layer-parent { &, & > * {