Skip to content

Commit

Permalink
[IMP] portal, website: change the default website body bg
Browse files Browse the repository at this point in the history
Use a very very very light gray as body background color for
the website so that default white cards have some contrast with the
body. Also adapt the portal system to use the portal colors when the
body bg color is equal to that very very very light gray (while it was
compared to $white before).
  • Loading branch information
qsm-odoo committed Dec 6, 2018
1 parent e1f9499 commit 7ab7a68
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions addons/portal/static/src/scss/bootstrap_overridden.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ $sizes: (
0: 0,
);

// Body
//
// Settings for the `<body>` element.

$body-bg: $o-portal-default-body-bg;

// Fonts
//
// Font, line-height, and color for body text, headings, and more.
Expand Down
2 changes: 1 addition & 1 deletion addons/portal/static/src/scss/portal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $o-portal-table-td-pb: map-get($spacers, 1) !default; // bts4 pb-1
$o-portal-bg-color: desaturate($gray-200, 100%);

// Check if portal uses default colors
$o-portal-use-default-colors: $body-bg == $white;
$o-portal-use-default-colors: $body-bg == $o-portal-default-body-bg;

// Frontend general
#wrapwrap {
Expand Down
1 change: 1 addition & 0 deletions addons/portal/static/src/scss/primary_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$o-portal-default-body-bg: #FCFCFC;
4 changes: 3 additions & 1 deletion addons/website/static/src/scss/bootstrap_overridden.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ $yiq-text-dark: if($-is-light, null, color('text'));
//
// Settings for the `<body>` element.

$body-bg: color('body');
@if color('body') { // Do not default to bootstrap but to the portal value
$body-bg: color('body');
}
$body-color: color('text');

// Fonts
Expand Down
2 changes: 1 addition & 1 deletion addons/website/static/src/scss/primary_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $o-theme-layout: 'full';
$-palettes: ();
@each $palette in $o-color-palettes {
$-palettes: append($-palettes, map-merge((
'body': null, // Default to bootstrap
'body': $o-portal-default-body-bg,
'menu': #F9F9F9,
'footer': #F9F9F9,
'text': null, // Default to bootstrap
Expand Down

0 comments on commit 7ab7a68

Please sign in to comment.