From ddf2d2dd666c6e3fa2b6b7f943575657a42d6d8b Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 4 Dec 2018 17:34:18 +0000 Subject: [PATCH] [IMP] web: patch BS4 to have beautiful colored cards BS4 colored cards do not have a very popular design. This will reset them to a BS3-like one: only the header and footer are colored and the body will use the color of a default card background with a light opacity (to let the chosen color appear). --- addons/web/static/src/scss/bootstrap_review.scss | 7 +++++++ addons/web/static/src/scss/primary_variables.scss | 2 ++ 2 files changed, 9 insertions(+) diff --git a/addons/web/static/src/scss/bootstrap_review.scss b/addons/web/static/src/scss/bootstrap_review.scss index 4efc59da2cf..9348fcce189 100644 --- a/addons/web/static/src/scss/bootstrap_review.scss +++ b/addons/web/static/src/scss/bootstrap_review.scss @@ -8,3 +8,10 @@ // They would go over floating elements, which is never what we want. clear: both; } + +.card-body { + // BS4 colored cards do not have a very popular design. This will reset them + // to a BS3-like one: only the header and footer are colored and the body + // will use the color of a default card background with a light opacity. + @include o-bg-color(rgba($card-bg, $o-card-body-bg-opacity)); +} diff --git a/addons/web/static/src/scss/primary_variables.scss b/addons/web/static/src/scss/primary_variables.scss index e3b520e47f1..45d1b7ac807 100644 --- a/addons/web/static/src/scss/primary_variables.scss +++ b/addons/web/static/src/scss/primary_variables.scss @@ -85,6 +85,8 @@ $o-cp-breadcrumb-height: 30px; $o-datepicker-week-color: #8f8f8f; +$o-card-body-bg-opacity: 0.9; + // Kanban $o-kanban-default-record-width: 300px;