From 903ff171acbef7f9fe6e533f43b99eba801b200f Mon Sep 17 00:00:00 2001
From: qsm-odoo
Date: Mon, 10 Sep 2018 14:12:43 +0200
Subject: [PATCH] [REF] portal, website: BS4, lower font size
With BS4, the website's font size was set to 16px instead of 14px as
before. We finally decided to force the 14px back. This commit also
moves some bootstrap variables extensions to portal as it should have
been done and reformat the files to match the bootstrap _variables.scss
file.
---
.../static/src/scss/bootstrap_overridden.scss | 13 +++++++++++
.../static/src/scss/primary_variables.scss | 2 ++
addons/portal/views/assets.xml | 11 ++++++++++
addons/web_editor/static/src/js/tours/rte.js | 2 +-
.../static/src/scss/bootstrap_overridden.scss | 22 +++++++++++++------
5 files changed, 42 insertions(+), 8 deletions(-)
create mode 100644 addons/portal/static/src/scss/bootstrap_overridden.scss
create mode 100644 addons/portal/static/src/scss/primary_variables.scss
diff --git a/addons/portal/static/src/scss/bootstrap_overridden.scss b/addons/portal/static/src/scss/bootstrap_overridden.scss
new file mode 100644
index 00000000000..1ea204f9dd4
--- /dev/null
+++ b/addons/portal/static/src/scss/bootstrap_overridden.scss
@@ -0,0 +1,13 @@
+// Fonts
+//
+// Font, line-height, and color for body text, headings, and more.
+
+$font-size-base: $o-theme-font-size-base;
+$font-size-sm: (12 / 16) * 1rem;
+
+// Buttons
+//
+// For each of Bootstrap's buttons, define text, background, and border color.
+
+$btn-padding-y-sm: (1 / 16) * 1rem;
+$btn-padding-x-sm: (5 / 16) * 1rem;
diff --git a/addons/portal/static/src/scss/primary_variables.scss b/addons/portal/static/src/scss/primary_variables.scss
new file mode 100644
index 00000000000..96c6aab32c3
--- /dev/null
+++ b/addons/portal/static/src/scss/primary_variables.scss
@@ -0,0 +1,2 @@
+
+$o-theme-font-size-base: (14 / 16) * 1rem;
diff --git a/addons/portal/views/assets.xml b/addons/portal/views/assets.xml
index 2afa3c0b886..d83de5c4898 100644
--- a/addons/portal/views/assets.xml
+++ b/addons/portal/views/assets.xml
@@ -1,5 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/web_editor/static/src/js/tours/rte.js b/addons/web_editor/static/src/js/tours/rte.js
index b997944a98b..abdcd39f35b 100644
--- a/addons/web_editor/static/src/js/tours/rte.js
+++ b/addons/web_editor/static/src/js/tours/rte.js
@@ -314,7 +314,7 @@ tour.register('rte_inline', {
trigger: '#wrapwrap img:first[width][height][style*="-radius"][style*="1px"][style*="padding"]',
}, {
content: "check the font image src",
- trigger: '#wrapwrap img:eq(1)[src^="/web_editor/font_to_img/"][src$="/rgb(0,160,157)/32"]',
+ trigger: '#wrapwrap img:eq(1)[src^="/web_editor/font_to_img/"][src$="/rgb(0,160,157)/28"]',
}, {
content: "check the font class to css",
trigger: '#wrapwrap img:eq(1)[height]:not([class*="fa"])',
diff --git a/addons/website/static/src/scss/bootstrap_overridden.scss b/addons/website/static/src/scss/bootstrap_overridden.scss
index 0cecba35228..d82f6ccd096 100644
--- a/addons/website/static/src/scss/bootstrap_overridden.scss
+++ b/addons/website/static/src/scss/bootstrap_overridden.scss
@@ -1,13 +1,21 @@
+//
+// Color system
+//
+
+$yiq-text-dark: color('text');
+
+// Body
+//
+// Settings for the `` element.
$body-bg: color('body');
-
$body-color: color('text');
-$yiq-text-dark: color('text');
-$headings-color: color('h1');
+
+// Fonts
+//
+// Font, line-height, and color for body text, headings, and more.
$font-family-sans-serif: nth($o-theme-fonts, $o-theme-font-number);
-$headings-font-family: nth($o-theme-fonts, $o-theme-headings-font-number);
-$font-size-sm: 0.75rem;
-$btn-padding-y-sm: 0.0625rem;
-$btn-padding-x-sm: 0.3125rem;
+$headings-font-family: nth($o-theme-fonts, $o-theme-headings-font-number);
+$headings-color: color('h1');