Extend utility classes allowing to use 'sm' and 'lg' variations for directional border-radius utility classes (eg. 'rounded-lg-left'). The aim is to avoid inconsistencies for all these components that use custom border-radius values (eg. chatter composer).
153 lines
3.8 KiB
SCSS
153 lines
3.8 KiB
SCSS
:root {
|
|
font-size: $o-root-font-size;
|
|
}
|
|
|
|
// ------------------------------------------------------------------
|
|
// General
|
|
// ------------------------------------------------------------------
|
|
.o_web_client {
|
|
direction: ltr;
|
|
position: relative; // normally useless but required by bootstrap-datepicker
|
|
background-color: $o-webclient-background-color;
|
|
}
|
|
|
|
// ------------------------------------------------------------------
|
|
// Misc. widgets
|
|
// ------------------------------------------------------------------
|
|
|
|
// Buttons
|
|
.o_icon_button {
|
|
background-color: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
outline: none;
|
|
}
|
|
|
|
// Boolean Toggle widget
|
|
div.o_boolean_toggle.custom-control.custom-checkbox {
|
|
$line-height-computed: $line-height-base * $font-size-base;
|
|
$slider-width: $line-height-computed * 1.5;
|
|
$font-size: $font-size-base * 1.2;
|
|
|
|
display: inline-block;
|
|
padding-left: $slider-width + 0.25rem;
|
|
|
|
> label.custom-control-label {
|
|
> i {
|
|
color: white;
|
|
cursor: pointer;
|
|
font-size: $font-size;
|
|
position: absolute;
|
|
top: 2px;
|
|
&.fa-times-circle {
|
|
right: 15px;
|
|
}
|
|
&.fa-check-circle {
|
|
right: 7px;
|
|
}
|
|
}
|
|
&::before,
|
|
&::after {
|
|
content: "";
|
|
top: 0;
|
|
left: -($slider-width + 0.25rem);
|
|
}
|
|
&::before {
|
|
width: $slider-width;
|
|
height: 100%;
|
|
background-color: #a0a0a0 !important;
|
|
border-radius: 100px;
|
|
outline: none !important;
|
|
}
|
|
}
|
|
> input.custom-control-input:checked + label.custom-control-label {
|
|
&::before {
|
|
background-color: $o-brand-primary !important;
|
|
}
|
|
&::after {
|
|
background-image: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
//== Backgound light colors variations (bootstrap extensions)
|
|
@each $-name, $-bg-color in $theme-colors {
|
|
$-safe-text-color: color-yiq(mix($-bg-color, $o-view-background-color));
|
|
@include bg-variant(".bg-#{$-name}-light", rgba(theme-color($-name), 0.5), $-safe-text-color);
|
|
}
|
|
|
|
.bg-muted {
|
|
@extend .bg-200;
|
|
}
|
|
|
|
.o_web_accesskey_overlay {
|
|
font-family: $font-family-sans-serif;
|
|
}
|
|
|
|
// == Extend default border-radius utility classes
|
|
//------------------------------------------------------------------------------
|
|
// Allows to use small and large variations for directional border-radius
|
|
// utility classes (eg. 'rounded-lg-left')
|
|
|
|
.rounded {
|
|
$sizes: ('-sm': $border-radius-sm, '-lg': $border-radius-lg);
|
|
|
|
@each $size, $radius in $sizes {
|
|
@each $side in ('left', 'right') {
|
|
&#{$size}-#{$side} {
|
|
border-top-#{$side}-radius: $radius !important;
|
|
border-bottom-#{$side}-radius: $radius !important;
|
|
}
|
|
}
|
|
|
|
@each $direction in ('top', 'bottom') {
|
|
&#{$size}-#{$direction} {
|
|
border-#{$direction}-left-radius: $radius !important;
|
|
border-#{$direction}-right-radius: $radius !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//== Badges
|
|
.badge {
|
|
margin: 1px 2px 1px 0;
|
|
}
|
|
|
|
//== Btn-link
|
|
.btn-link {
|
|
font-weight: $btn-font-weight;
|
|
|
|
// -- Btn-link variations
|
|
// Adapt the behavieur of .btn-link buttons when in conjuction with contextual
|
|
// classes (eg. text-warning). 'muted' is set as default text color, while
|
|
// the contextual-class color will be used on ':hover'.
|
|
|
|
// Apply all theme-colors variations except "secondary"
|
|
@each $-name, $-color in map-remove($theme-colors, "secondary") {
|
|
&.btn-#{$-name}, &.text-#{$-name} {
|
|
@include o-btn-link-variant($o-main-color-muted!important, o-text-color($-name) or $-color!important);
|
|
}
|
|
}
|
|
|
|
// Specific behavieur for "secondary"
|
|
&.btn-secondary {
|
|
@include o-btn-link-variant($body-color, $headings-color);
|
|
}
|
|
}
|
|
|
|
//== Printing improvements
|
|
@media print {
|
|
.table-responsive {
|
|
overflow-x: initial;
|
|
}
|
|
}
|
|
|
|
//== Action manager
|
|
// ensure special links are styled as pointers even when they don't
|
|
// have an href
|
|
[type="action"],
|
|
[type="toggle"] {
|
|
cursor: pointer !important;
|
|
}
|