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). closes odoo/odoo#29318
34 lines
1.1 KiB
SCSS
34 lines
1.1 KiB
SCSS
//
|
|
// Color system
|
|
//
|
|
|
|
// Bootstrap default for $yiq-text-light and $yiq-text-dark are $white and
|
|
// $gray-900. What we want to do is use the user text color as light or dark
|
|
// depending on its contrast. Themes should be careful if they decide to
|
|
// override those values. This would be simplified by giving the user the choice
|
|
// for its dark *and* light text colors.
|
|
$-light: if($white != null, $white, #FFFFFF);
|
|
$-dark: if($gray-900 != null, $gray-900, #212529);
|
|
$-text: if(color('text') != null, color('text'), $-dark);
|
|
$-is-light: (o-get-most-contrast($-text, $-light, $-dark, color('body'), $cross-mix: false) == $-dark);
|
|
$yiq-text-light: if($-is-light, color('text'), null);
|
|
$yiq-text-dark: if($-is-light, null, color('text'));
|
|
|
|
// Body
|
|
//
|
|
// Settings for the `<body>` element.
|
|
|
|
@if color('body') { // Do not default to bootstrap but to the portal value
|
|
$body-bg: color('body');
|
|
}
|
|
$body-color: color('text');
|
|
|
|
// 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);
|
|
$headings-color: color('h1');
|