From 52ec536cef2ec84af0b36746f19a8cdf9f23fe2a Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 21 Dec 2018 10:37:10 +0000 Subject: [REF] *: make stronger bootstrap assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * portal, theme_bootswatch, web, web_editor, website With less2sass and bs3tobs4 tasks, the assets structure was reviewed to handle the specificities of both framework and to prepare for our next odoo tasks. In particular, the assets_helpers and bootstrap overrides were basically split into 4 parts: utils, primary variables, secondary variables and bootstrap variables. (see https://github.com/odoo/odoo/commit/6e4db7d13a926845bf82f5b035afede42d6d5a89) Using the !default system for the bootstrap variables parts seems now a good improvement. This is part of what this commit does: adding the default flag for all bootstrap variables overrides and inverting the order of the files in the _assets_backend_helpers and _assets_frontend_helpers templates. This allows to avoid code like this: portal: ``` $body-bg: white; ``` website: ``` @​if $var != null { $body-bg: $var; } ``` This code makes the body white with portal or equal to $var with website if $var has a value. The same behavior in the new file order is achieved with: website: ``` $body-bg: $var !default; ``` portal: ``` $body-bg: white !default; ``` This order is now also followed for the _assets_secondary_variables templates (there are only a few). This commit also make better assets hierarchy by making website inherit from portal assets (instead of web) and portal inherit from web_editor assets (instead of web) (thus relying on strong dependencies instead of installation order which is not always right for migrated databases). closes odoo/odoo#29757 --- addons/web/static/src/scss/bootstrap_overridden_frontend.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/scss/bootstrap_overridden_frontend.scss') diff --git a/addons/web/static/src/scss/bootstrap_overridden_frontend.scss b/addons/web/static/src/scss/bootstrap_overridden_frontend.scss index f803cf3e72d..b36ccc0ae24 100644 --- a/addons/web/static/src/scss/bootstrap_overridden_frontend.scss +++ b/addons/web/static/src/scss/bootstrap_overridden_frontend.scss @@ -2,4 +2,4 @@ // // Font, line-height, and color for body text, headings, and more. -$font-size-base: $o-theme-font-size-base; +$font-size-base: $o-theme-font-size-base !default; -- cgit v1.2.3