summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-12-04 17:34:18 +0000
committerqsm-odoo <qsm@odoo.com>2018-12-05 10:31:37 +0000
commitddf2d2dd666c6e3fa2b6b7f943575657a42d6d8b (patch)
treeb594dad7edae34401315d703c16a3f4e6023b60a
parenta1aec3373642fab38c8bcce0e7407e1d0547e892 (diff)
[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).
-rw-r--r--addons/web/static/src/scss/bootstrap_review.scss7
-rw-r--r--addons/web/static/src/scss/primary_variables.scss2
2 files changed, 9 insertions, 0 deletions
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;