mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
a6529ea67b
Many themes were overriding the yiq threshold, thus having an impact
on which of the dark or light text is used over a particuler background
by default. This is a tricky value to change and only made some sense
when the Odoo themes were defining their own color palettes. Now that
all palettes can be used in all themes, it makes no sense to change the
yiq threshold as it induces inconsistent behavior for a same palette
used in different themes. Besides, leaving the value by default is most
of the time what you want and when it is not entirely correct, the user
has full control over the color combination text colors anyway.
task-2655730
closes odoo/design-themes#507
X-original-commit: f244035809
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
120 lines
4.3 KiB
SCSS
120 lines
4.3 KiB
SCSS
//------------------------------------------------------------------------------//
|
|
// TODO ideally this should be done in primary variables if it was possible.
|
|
//------------------------------------------------------------------------------//
|
|
|
|
// Headings
|
|
@if o-website-value('headings-font') == 'Roboto' {
|
|
$o-theme-headings-font-weight: 500;
|
|
}
|
|
@else if o-website-value('headings-font') == 'Nunito' {
|
|
$o-theme-headings-font-weight: 600;
|
|
}
|
|
@else if o-website-value('headings-font') == 'Advent Pro' {
|
|
$o-theme-headings-font-weight: 600;
|
|
}
|
|
|
|
// Body
|
|
@if o-website-value('font') == 'Roboto' {
|
|
$o-theme-font-weight-bold: 500;
|
|
}
|
|
@else if o-website-value('font') == 'Lato' {
|
|
$o-theme-font-weight-light: 300;
|
|
$o-theme-font-weight-bold: 600;
|
|
}
|
|
@else if o-website-value('font') == 'Advent Pro' {
|
|
$o-theme-font-weight-bold: 600;
|
|
}
|
|
@else if o-website-value('font') == 'Oswald' {
|
|
$o-theme-font-weight-light: 200;
|
|
$o-theme-font-weight-normal: 300;
|
|
$o-theme-font-weight-bold: 400;
|
|
}
|
|
@else if o-website-value('font') == 'Open Sans' {
|
|
$o-theme-font-weight-bold: 600;
|
|
}
|
|
@else if o-website-value('font') == 'Montserrat Alternates' {
|
|
$o-theme-font-weight-bold: 600;
|
|
}
|
|
|
|
// Buttons
|
|
@if o-website-value('buttons-font') == 'Roboto' {
|
|
$o-theme-btn-font-weight: 500;
|
|
}
|
|
@else if o-website-value('buttons-font') == 'Advent Pro' {
|
|
$o-theme-btn-font-weight: 600;
|
|
}
|
|
@else if o-website-value('buttons-font') == 'Oswald' {
|
|
$o-theme-btn-font-weight: 200;
|
|
}
|
|
@else if o-website-value('buttons-font') == 'Open Sans' {
|
|
$o-theme-btn-font-weight: 600;
|
|
}
|
|
@else if o-website-value('buttons-font') == 'Montserrat Alternates' {
|
|
$o-theme-btn-font-weight: 600;
|
|
}
|
|
|
|
//------------------------------------------------------------------------------//
|
|
// Bootstrap
|
|
//------------------------------------------------------------------------------//
|
|
|
|
// Options
|
|
//
|
|
// Quickly modify global styling by enabling or disabling optional features.
|
|
|
|
$enable-shadows: true;
|
|
|
|
// Spacing
|
|
//
|
|
// Control the default styling of most Bootstrap elements by modifying these
|
|
// variables. Mostly focused on spacing.
|
|
// You can add more entries to the $spacers map, should you need more variation.
|
|
|
|
$spacer: 1.25rem !default;
|
|
|
|
// Components
|
|
//
|
|
// Define common padding and border radius sizes and more.
|
|
|
|
$border-radius: .125rem !default;
|
|
$border-radius-lg: .25rem !default;
|
|
$border-radius-sm: 0 !default;
|
|
|
|
// Badges
|
|
|
|
$badge-border-radius: 10rem !default;
|
|
$badge-padding-y: .5em !default;
|
|
$badge-padding-x: 1rem !default;
|
|
|
|
// Typography
|
|
//
|
|
// Font, line-height, and color for body text, headings, and more.
|
|
|
|
$font-size-lg: o-website-value('font-size-base') * $o-theme-font-size-lg-multiplier !default;
|
|
$font-size-sm: o-website-value('font-size-base') * $o-theme-font-size-sm-multiplier !default;
|
|
|
|
$font-weight-light: $o-theme-font-weight-light !default;
|
|
$font-weight-normal: $o-theme-font-weight-normal !default;
|
|
$font-weight-bold: $o-theme-font-weight-bold !default;
|
|
|
|
$headings-font-weight: $o-theme-headings-font-weight !default;
|
|
|
|
// Buttons + Forms
|
|
//
|
|
// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.
|
|
|
|
$input-btn-focus-width: 0 !default;
|
|
$input-focus-border-color: o-color('primary') !default;
|
|
|
|
$btn-font-weight: $o-theme-btn-font-weight !default;
|
|
$btn-box-shadow: none !default;
|
|
|
|
$input-color: o-color('o-cc1-text') !default;
|
|
$input-placeholder-color: o-color('500') !default;
|
|
|
|
// Cards
|
|
|
|
$card-spacer-y: 1rem !default;
|
|
$card-spacer-x: 1.75rem !default;
|
|
$card-border-width: 0 !default;
|
|
$card-border-radius: $border-radius-lg !default;
|