Files
odoo-docs/extensions/odoo_theme/static/scss/_variables.scss
Elisabeth Dickinson 6dbff460fb [IMP][CSS] Use CSS variables to style different alert types
CSS variables avoid having to repeat code for each alert type.
Also remove the need to add "tip" to the theme-colors (no need for "tip"
styled buttons, badges etc, especially as tips use the primary color) by
styling `.alert-tip` with customized copy of BS alert mechanism.

In order to be able to modify the icons with a CSS variable,
the `content` attribute has been removed from the `o-inline-icon` mixin.
Code where this mixin is called in other places has been adapted.
2023-01-05 12:53:11 +01:00

193 lines
6.1 KiB
SCSS

$o-grid-breakpoint-xxl: 1400px;
$o-grid-breakpoint-xxxl: 1680px;
$o-container-max-width-xxl:1380px;
$o-container-max-width-xxxl: 1560px;
// Typography
// ===============================================
$o-font-family-serif: 'Roboto Slab', Georgia, "Times New Roman", Times, serif;
$o-fw_extralight: 200;
$o-fw_light: 300;
$o-fw-regular: 400;
$o-fw-medium: 500;
$o-fw-semibold: 600;
$o-fw-bold: 700;
$o-fw-extrabold: 800;
$o-fw_black: 900;
//------------------------------------------------------------------------------
// icomoon icons
//------------------------------------------------------------------------------
$i-arrow-up: "\e948";
$i-arrow-down: "\e945";
$i-arrow-left: "\e946";
$i-arrow-right: "\e947";
$i-chevron-up: "\e94c";
$i-chevron-down: "\e949";
$i-chevron-left: "\e94a";
$i-chevron-right: "\e94b";
$i-link: "\e94f";
$i-external-link: "\e940";
$i-websites: "\e944";
$i-sales: "\e953";
$i-sales_2: "\e931";
$i-marketing: "\e922";
$i-apps_1: "\e904";
$i-apps_2: "\e905";
$i-app_features: "\e902";
$i-app-favorites: "\e903";
$i-basics: "\e906";
$i-cart: "\e907";
$i-shop: "\e937";
$i-accountant: "\e900";
$i-customer-reviews: "\e90d";
$i-hr: "\e91c";
$i-developer: "\e90e";
$i-users: "\e93f";
$i-doc-hr: "\e90f";
$i-doc-apps: "\e910";
$i-doc-contribute: "\e911";
$i-doc-admin_2: "\e912";
$i-doc-dev: "\e92d";
$i-doc-services: "\e913";
$i-doc-admin: "\e933";
$i-documentation: "\e914";
$i-scaleup: "\e934";
$i-knowledge: "\e920";
$i-tutorial: "\e93e";
$i-elearning_1: "\e915";
$i-elearning_2: "\e916";
$i-install: "\e91e";
$i-o-edu: "\e926";
$i-certifications: "\e908";
$i-events: "\e917";
$i-showcase: "\e938";
$i-jobs: "\e91f";
$i-finances: "\e919";
$i-money-bag: "\e923";
$i-money-plant: "\e924";
$i-o-help: "\e927";
$i-o-logo: "\e928";
$i-o-services: "\e929";
$i-o-tour: "\e92a";
$i-services: "\e936";
$i-operations_1: "\e92b";
$i-operations_2: "\e92c";
$i-performance: "\e92f";
$i-time-management_2: "\e93b";
$i-time-management: "\e93c";
$i-advanced: "\e901";
$i-search: "\e935";
$i-view: "\e952";
$i-view-more: "\e950";
$i-view-next: "\e951";
$i-partners: "\e92e";
$i-contact: "\e90c";
$i-forums: "\e91a";
$i-github: "\e91b";
$i-support: "\e939";
$i-collaborating: "\e90a";
$i-compare: "\e90b";
$i-themes: "\e93a";
$i-translate: "\e93d";
$i-release: "\e930";
$i-info: "\e91d";
$i-warning: "\e943";
$i-danger: "\e94d";
$i-note: "\e925";
$i-exercise: "\e918";
$i-lightbulb: "\e921";
$i-check: "\e909";
$i-edit: "\e932";
$i-article: "\e94e";
$i-sidepanel: "\e941";
$i-close: "\e942";
//------------------------------------------------------------------------------
// Colors
//------------------------------------------------------------------------------
$o-gray-light : $gray-400;
$o-gray : $gray-600;
$o-gray-border: $gray-400;
$o-gray-bg: $gray-200;
$o-gray-color: $gray-900;
$o-violet : #7A436B; //Odoo's #875a7b Doesn't give AAA contrast on white background
$o-blue : #77b5d1;
$o-cyan: #0dcaf0;
$o-teal : #017e84;
$o-green : #519161;
$o-orange: #f39c1e;
$o-red: #D9534F;
$o-red-light: #FF5722;
$o-literals-bg: $gray-200;
$o-literals-border: $o-literals-bg;
$o-toc-bg: $o-gray-bg;
$o-toc-border: $o-toc-bg;
$o-alert-note-color: $primary;
$o-alert-tip-color: $primary;
$o-alert-example-color: $success;
$o-alert-warning-color: $success;
$o-alert-danger-color: $danger;
$o-alert-exercises-color: $dark;
$o-accordion-bg: $o-alert-exercises-color!default;
//------------------------------------------------------------------------------
// Misc
//------------------------------------------------------------------------------
// Header
$o-header-mobile-height: 50px;
$o-header-height: 80px;
$o-header-bg: $white;
$o-subheader-height: 32px;
$o-headers-mobile-height: $o-header-mobile-height + $o-subheader-height;
$o-headers-height: $o-header-height + $o-subheader-height;
// Navigation
$o-side-nav-width: 350px;
$o-on-page-width: 20%;
// o_has_code_column pages
$o-halfpage-width: 54%;
$o-codecol-width: 43%;
// Paddings and margins
$o-padding-xs: .5rem;
$o-padding-s: 1rem;
$o-padding-m: 2rem;
$o-padding-l: 3rem;
$o-margin-s: $o-padding-s;
$o-margin-m: $o-padding-m;
$o-margin-l: $o-padding-l;
$o-icon-margin: .2em;
//------------------------------------------------------------------------------
// Components
//------------------------------------------------------------------------------
// Alerts
$o-alert-default-icon: $i-info;
$o-alert-code-border-color: $o-gray-border;
$o-alert-types: (
"primary": ("color": $primary, "icon": $i-exercise),
"secondary": ("color": $secondary, "icon": $i-arrow-right),
"tip": ("color": $primary, "icon": $i-lightbulb),
"success": ("color": $success, "icon": $i-knowledge),
"warning": ("color": $warning, "icon": $i-warning),
"danger": ("color": $danger, "icon": $i-danger),
"dark": ("color": $dark, "icon": $i-exercise)
);