[IMP] odoo_theme: Fix alerts and accordions colors

closes odoo/documentation#3319

X-original-commit: 8aebb79237
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Elisabeth Dickinson 2023-01-11 14:01:15 +00:00
parent 5b9d73bd9d
commit 8b7df4edc8
3 changed files with 8 additions and 19 deletions

View File

@ -118,15 +118,6 @@ $o-literals-border: $o-literals-bg;
$o-toc-bg: $o-gray-bg;
$o-toc-border: $o-toc-bg;
$o-alert-note-color: $primary;
$o-alert-tip-color: $primary;
$o-alert-example-color: $success;
$o-alert-warning-color: $success;
$o-alert-danger-color: $danger;
$o-alert-exercises-color: $dark;
$o-accordion-bg: $o-alert-exercises-color!default;
//------------------------------------------------------------------------------
// Misc
//------------------------------------------------------------------------------

View File

@ -89,12 +89,12 @@ $modal-xl: fit-content;
// Accordion
$accordion-body-padding-y: 0 !default;
$accordion-body-padding-x: 0 !default;
$accordion-color: shade-color($gray-200, 60%) !default;
$accordion-color: $dark !default;
$accordion-bg: $gray-200;
$accordion-button-color: $accordion-color !default;
$accordion-button-active-color: $accordion-button-color !default;
$accordion-button-bg: $accordion-bg !default;
$accordion-button-bg: transparent;
$accordion-button-active-bg: $accordion-button-bg !default;
$accordion-button-focus-box-shadow: transparent;
$accordion-icon-transform: rotate(0deg) !default;
@ -103,5 +103,3 @@ $accordion-icon-transform: rotate(0deg) !default;
$alert-border-width: 3px;
$alert-border-scale: 0;
$alert-border-radius: 0 3px 3px 0;
$alert-bg-scale: -87%;
$alert-color-scale: 40%;

View File

@ -993,9 +993,9 @@ header {
// Exercises
&.alert-dark {
--o-alert-icon: '#{$i-exercise}';
--o-alert-code-border-color: #{tint-color($dark, 50%)};
--o-alert-code-border-color: $dark;
background: $gray-300;
background: $gray-200;
}
}
.graphviz {
@ -1013,12 +1013,12 @@ header {
//------------------------------------------------------------------------------
.o_spoiler {
$background: shift-color($o-accordion-bg, $alert-bg-scale);
$border: shift-color($o-accordion-bg, $alert-border-scale);
$color: shift-color($o-accordion-bg, $alert-color-scale);
$background: $gray-200;
$border: shift-color($accordion-color, $alert-border-scale);
$color: shift-color($accordion-color, $alert-color-scale);
@if (contrast-ratio($background, $color) < $min-contrast-ratio) {
$color: mix($o-accordion-bg, color-contrast($background), abs($alert-color-scale));
$color: mix($dark, color-contrast($background), abs($alert-color-scale));
}
@include alert-variant($background, $border, $color);