From a8b3800a9ce1a03d7e1bbccc034aca537307f3fe Mon Sep 17 00:00:00 2001 From: David Beguin Date: Wed, 22 Jan 2020 15:27:21 +0000 Subject: [PATCH] [FIX] survey: ensure same color in community and enterprise while taking surveys Use $primary to always get same color in COM and ENT. The goal of using color variable for styling is to get always the same color, no matter if we are in community or on enterprise. Before this commit, *$o-brand-primary* was used in survey stylesheet but this variable is not matching the same colors in COM and in ENT. After this commit, *$primary* is used to render the same color no matter the environment (COM or ENT). Triggered by task ID 1972640 (live sessions on survey) PR #44205 --- .../survey/static/src/scss/survey_form.scss | 22 +++++++++---------- addons/survey/views/assets.xml | 4 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/addons/survey/static/src/scss/survey_form.scss b/addons/survey/static/src/scss/survey_form.scss index 7c54bed6738..262a0532130 100644 --- a/addons/survey/static/src/scss/survey_form.scss +++ b/addons/survey/static/src/scss/survey_form.scss @@ -21,14 +21,14 @@ .o_survey_question_datetime, .o_survey_question_numerical_box { border: 0px; - border-bottom: 2px solid $o-brand-primary; + border-bottom: 2px solid $primary; &:disabled { color: black !important; border-color: $gray-600; border-bottom: 2px solid $gray-600; } &:focus { - border-color: $o-brand-primary; + border-color: $primary; } } @@ -96,16 +96,16 @@ min-height: 100%; .o_survey_choice_btn { - background-color: rgba($o-brand-primary, 0.5); - border: 2px solid $o-brand-primary; + background-color: rgba($primary, 0.5); + border: 2px solid $primary; cursor: pointer; &.o_survey_selected { - background-color: $o-brand-primary; + background-color: $primary; } &:hover { - background-color: rgba($o-brand-primary, 0.8); + background-color: rgba($primary, 0.8); .o_survey_choice_key span.o_survey_key { opacity: 1; } @@ -115,14 +115,14 @@ .o_survey_choice_key { width: 25px; height: 25px; - border: 2px solid $o-brand-primary; + border: 2px solid $primary; span { font-size: smaller; top: -2px; &.o_survey_key { width: inherit; right: 10px; - border: 2px solid $o-brand-primary; + border: 2px solid $primary; border-right: 0px; height: 25px; opacity: 0; @@ -134,13 +134,13 @@ .o_survey_question_matrix { th { - background-color: $o-brand-primary; + background-color: $primary; } td { - background-color: rgba($o-brand-primary, 0.2); + background-color: rgba($primary, 0.2); &:hover { - background-color: rgba($o-brand-primary, 0.5); + background-color: rgba($primary, 0.5); cursor: pointer; .o_survey_choice_key span.o_survey_key { opacity: 1; diff --git a/addons/survey/views/assets.xml b/addons/survey/views/assets.xml index b1f3df0a00e..846c0e0150d 100644 --- a/addons/survey/views/assets.xml +++ b/addons/survey/views/assets.xml @@ -13,7 +13,9 @@