/// /// This file contains all variables and mixins that are specific to the editor. /// // Mobile fix for mass mailing @include media-breakpoint-down(lg) { body.editor_enable.editor_has_snippets { #web_editor-top-edit { position: initial !important; height: initial !important; top: initial !important; left: initial !important; } } } .oe_snippet { // No root because can be drag and drop (and the helper is in the body) position: relative; z-index: $o-we-zindex; width: 77px; background-color: $o-we-sidebar-blocks-content-snippet-bg; &.o_draggable_dragging { transform: rotate(-3deg) scale(1.2); box-shadow: 0 5px 25px -10px black; transition: transform 0.3s, box-shadow 0.3s; } > .oe_snippet_body { display: none !important; } .oe_snippet_thumbnail { width: 100%; overflow: hidden; .oe_snippet_thumbnail_img { width: 100%; padding-top: 75%; background-repeat: no-repeat; background-size: contain; background-position: top center; overflow: hidden; } } .oe_snippet_thumbnail_title { display: none; } &:not(:hover):not(.o_disabled):not(.o_snippet_install) { background-color: rgba($o-we-sidebar-blocks-content-snippet-bg, .9); .oe_snippet_thumbnail { filter: saturate(.7); opacity: .9; } } } @mixin we-svg-icon( $graphic: $o-we-sidebar-content-field-color, $subdle: $o-we-sidebar-content-field-color, $subdle-opacity: 0.5) { svg { .o_graphic { fill: $graphic; } .o_subdle { fill: rgba($subdle, $subdle-opacity); } } } %we-generic-clickable { outline: none; text-decoration: none; line-height: $o-we-sidebar-content-field-height - 2 * $o-we-sidebar-content-field-border-width; cursor: pointer; &[disabled] { opacity: .5; } &:not([disabled]) { &.active:not(.o_we_no_toggle):not(.o_we_checkbox_wrapper), &:hover { color: $o-we-sidebar-content-field-pressed-color; } $-hover-colors: ( 'success': $o-we-color-success, 'info': $o-we-color-info, 'warning': $o-we-color-warning, 'danger': $o-we-color-danger, 'brand_primary': $o-brand-primary, ); @each $name, $color in $-hover-colors { &.o_we_text_#{$name} { color: $color; } &.o_we_hover_#{$name}:hover { color: $color; } &.o_we_bg_#{$name} { color: white; background-color: $color; &:hover { background-color: darken($color, 7.5%); } } } } } %we-generic-link { color: $o-we-sidebar-content-field-color; @include we-svg-icon(); @extend %we-generic-clickable; &:not([disabled]) { &.active, &:hover { @include we-svg-icon($o-we-sidebar-content-field-pressed-color, $subdle-opacity: .75); } } } %we-generic-button { @extend %we-generic-clickable; @include o-text-overflow(block); @include we-svg-icon($o-we-sidebar-content-field-clickable-color, $o-we-sidebar-content-field-clickable-color); padding: 0 $o-we-sidebar-content-field-button-group-button-spacing; border: $o-we-sidebar-content-field-border-width solid $o-we-sidebar-content-field-border-color; border-radius: $o-we-sidebar-content-field-border-radius; background-color: $o-we-sidebar-content-field-clickable-bg; color: $o-we-sidebar-content-field-clickable-color; text-align: center; &:not([disabled]):hover, &.active:not(.o_we_no_toggle) { @include we-svg-icon($o-we-sidebar-content-field-pressed-color, $subdle-opacity: .75); } &.active:not(.o_we_no_toggle, .o_we_collapse_toggler) { background-color: $o-we-sidebar-content-field-pressed-bg; } } %we-generic-tab-button { @extend %we-generic-link; display: inline-flex; flex: 1 1 auto; justify-content: center; min-width: 0; border: none; background-color: transparent; color: inherit; font-weight: normal; > span { @include o-text-overflow(inline-block); $-r: $o-we-sidebar-tabs-size-ratio; padding: (0.6em * $-r) (0.4em * $-r) (0.5em * $-r); } &.active > span { color: $o-we-sidebar-content-field-colorpicker-dropdown-active-color; box-shadow: inset 0 ($o-we-sidebar-tabs-active-border-width * -1) 0 $o-we-sidebar-tabs-active-border-color; } } %we-generic-text-input { > div { border: $o-we-sidebar-content-field-border-width solid $o-we-sidebar-content-field-border-color; border-radius: $o-we-sidebar-content-field-border-radius; background-color: $o-we-sidebar-content-field-input-bg; &:focus-within { border-color: $o-we-sidebar-content-field-input-border-color; } input { box-sizing: content-box; padding: 0 $o-we-sidebar-content-field-clickable-spacing; border: none; border-radius: 0; background-color: transparent; color: inherit; &:focus { outline: none; } } > we-button { // for input-group border: none; } } } // SNIPPET PANEL #oe_snippets { @include o-input-number-no-arrows(); @include o-position-absolute(var(--o-we-toolbar-height), 0, 0, auto); position: fixed; z-index: $o-we-zindex; display: flex; flex-flow: column nowrap; width: $o-we-sidebar-width; border-left: $o-we-sidebar-border-width solid $o-we-sidebar-border-color; background-color: $o-we-sidebar-bg; color: $o-we-sidebar-color; font-family: $o-we-font-family; font-size: $o-we-sidebar-font-size; font-weight: 400; transition: transform 400ms ease 0s; transform: translateX(100%); *::selection { background: lighten($o-we-accent, 9); color: $o-we-bg-darkest; } // EDITOR TOP BAR AND POPOVER .o_we_website_top_actions { display: flex; justify-content: flex-start; width: $o-we-sidebar-width; height: $o-we-sidebar-top-height; // Firefox css fix min-height: $o-we-sidebar-top-height; background-color: $o-we-sidebar-tabs-bg; .btn-group, .btn { height: 100%; } .btn { border: none; border-radius: 0; padding: 0.375rem 0.75rem; font-size: $o-we-font-size; font-weight: 400; line-height: 1; &:not(.fa) { font-family: $o-we-font-family; } &.btn-primary { @include button-variant($o-brand-primary, $o-brand-primary); } &.btn-secondary { @include button-variant($o-we-sidebar-tabs-bg, $o-we-sidebar-tabs-bg); } &:focus, &:active, &:focus:active { outline: none; box-shadow: none !important; } } .dropdown-menu { left: auto; right: 0; } } %o_we_sublevel > we-title::before { content: "└"; // TODO The size and look of this depends on the // browser default font, we should use a SVG instead. display: inline-block; margin-right: 0.4em; .o_rtl & { transform: scaleX(-1); } } @for $level from 1 through 3 { .o_we_sublevel_#{$level} { @extend %o_we_sublevel; @if $level > 1 { > we-title { padding-left: ($level - 1) * 0.6em; } } } } #snippets_menu { flex: 0 0 auto; display: flex; align-items: end; background-color: $o-we-sidebar-tabs-bg; box-shadow: $o-we-item-standup-top rgba($o-we-item-standup-color-light, .2); color: $o-we-sidebar-tabs-color; height: $o-we-sidebar-tabs-height; > button { @extend %we-generic-tab-button; } } .tooltip { pointer-events: none !important; } // Snippet filter input .o_snippet_search_filter { position: relative; box-shadow: $o-we-item-standup-bottom $o-we-item-standup-color-dark, 0 10px 10px rgba($o-we-item-standup-color-dark, .2); z-index: 2; &, .o_snippet_search_filter_input { width: 100%; } .o_snippet_search_filter_input { background-color: $o-we-sidebar-content-field-input-bg; padding: $o-we-sidebar-blocks-content-spacing 2em $o-we-sidebar-blocks-content-spacing $o-we-sidebar-blocks-content-spacing; border: 0; border-bottom: $o-we-sidebar-content-field-border-width solid $o-we-sidebar-content-field-border-color; color: $o-we-fg-lighter; &::placeholder { font-style: italic; color: $o-we-sidebar-content-field-control-item-color; } &:focus { background-color: $o-we-bg-lighter; outline: none; } } .o_snippet_search_filter_reset { @include o-position-absolute($o-we-sidebar-blocks-content-spacing, $o-we-sidebar-blocks-content-spacing, $o-we-sidebar-blocks-content-spacing); display: flex; justify-content: center; align-items: center; padding: 0 $o-we-sidebar-content-field-clickable-spacing; @include o-hover-text-color($o-we-sidebar-content-field-control-item-color, $o-we-fg-lighter); cursor: pointer; } } > #o_scroll, > .o_we_customize_panel { min-height: 0; overflow: auto; } > #o_scroll { background-color: $o-we-sidebar-blocks-content-bg; padding: 0 $o-we-sidebar-blocks-content-spacing; height: 100%; // give enough space for tips pointing at snippets after a snippet search z-index: 1; .o_panel, .o_panel_header { padding: $o-we-sidebar-blocks-content-spacing 0; } .o_panel_body { display: flex; // Needed for too long snippet names flex-wrap: wrap; margin-left: -$o-we-sidebar-blocks-content-snippet-spacing; > .oe_snippet { flex: 0 0 auto; width: percentage(1 / 3); background-clip: padding-box; border-left: $o-we-sidebar-blocks-content-snippet-spacing solid transparent; margin-bottom: $o-we-sidebar-blocks-content-snippet-spacing; user-select: none; @include o-grab-cursor; .oe_snippet_thumbnail_title { @include o-text-overflow(block); white-space: normal; padding: $o-we-sidebar-blocks-content-spacing / 2; text-align: center; } &.o_disabled .o_snippet_undroppable { @include o-position-absolute(8px, 6px, auto, auto); } &.o_disabled { pointer-events: initial; } &.o_snippet_install { .btn.o_install_btn { z-index: 1; @include o-position-absolute($top: 10px); } &:not(:hover) .btn.o_install_btn { display: none; } } &.o_disabled, &.o_snippet_install { cursor: default; background-color: rgba($o-we-sidebar-blocks-content-snippet-bg, .2); .oe_snippet_thumbnail_img { opacity: .4; filter: saturate(0) blur(1px); } } } } #snippet_custom .oe_snippet { width: 100%; &, .oe_snippet_thumbnail, .btn { display: flex; } .oe_snippet_thumbnail, .btn { align-items: center; } .oe_snippet_thumbnail { min-width: 0; // Ensure text-overflow on flex children } .oe_snippet_thumbnail_title { white-space: nowrap; } .oe_snippet_thumbnail_img { flex-shrink: 0; width: 41px; height: 30px; // 82x60 -> 41x30 padding: 0; } .btn { @extend %we-generic-link; padding-top: 0; padding-bottom: 0; padding-left: 0; } &:not(:hover) .btn { display: none; } we-input.o_we_user_value_widget { @extend %we-generic-text-input; cursor: pointer; > div { display: flex; } input { cursor: text; } we-button { @extend %we-generic-clickable; cursor: pointer; flex: 1 1 auto; padding: 0 $o-we-sidebar-content-field-button-group-button-spacing; line-height: 17px; text-align: center; &:hover { background-color: gray; } } } } } > .o_we_customize_panel { position: relative; flex: 1; @mixin we-icon-button($icon, $color: $o-we-sidebar-content-field-control-item-color, $align: right) { @extend %we-icon-button; padding-#{$align}: 2 * $o-we-sidebar-content-field-control-item-spacing + $o-we-sidebar-content-field-control-item-size; &::after { content: $icon; color: $color; @if $align == left { right: auto; left: $o-we-sidebar-content-field-control-item-spacing; } } } @mixin large-component() { flex: 1 1 auto; width: $o-we-sidebar-content-available-room * .6; } we-button, we-toggler { @extend %we-generic-button; } #removeFormat, #oe-table-delete-table { @extend %we-generic-link; } .oe-toolbar { position: relative; background: transparent; margin-top: $o-we-sidebar-content-field-spacing; padding: 0 $o-we-sidebar-content-padding-base 0 $o-we-sidebar-content-indent; grid-template-areas: "typo typo style style colors" "size align list list link" "ai animate animate hilight hilight" "translate translate . . ." "options options options options options" "options2 options2 options2 options2 options2" "options3 options3 options3 options3 options3"; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; grid-template-rows: minmax($o-we-sidebar-content-field-height, auto) minmax($o-we-sidebar-content-field-height, auto) minmax($o-we-sidebar-content-field-height, auto) minmax($o-we-sidebar-content-field-height, auto) auto auto auto; row-gap: $o-we-sidebar-content-field-spacing; column-gap: $o-we-sidebar-content-field-multi-spacing; width: 100%; &::before { display: none; // remove ballon } .fa { font-size: $o-we-sidebar-font-size; } .btn { @extend %we-generic-button; display: flex; padding: ($o-we-sidebar-content-field-height * .12) ($o-we-sidebar-content-field-button-group-button-spacing - 2.5); } .dropdown-menu { border-color: $o-we-sidebar-content-field-dropdown-border-color; padding: 0; > li ~ li { border-top: $o-we-sidebar-content-field-dropdown-item-spacing solid transparent; } } #translate .dropdown-menu { min-width: auto; max-width: 250px; .dropdown-item { overflow-x: hidden; text-overflow: ellipsis; } } .dropdown-item { @include we-icon-button('', $align: left); // Always a padding on the left background-color: $o-we-sidebar-content-field-dropdown-item-bg; color: $o-we-sidebar-content-field-dropdown-item-color; border-radius: 0; padding-top: 5px; padding-bottom: 5px; &:hover, &:focus { background: $o-we-dropdown-item-bg-hover; color: $o-we-dropdown-item-hover-color; } &.active { background: $o-we-dropdown-item-active-bg; color: $o-we-dropdown-item-active-color; } } .o_we_font_size_badge { opacity: 0.6; } #font-size > button { &:focus-within { @extend %we-generic-text-input; // Cancel the height of the border: margin-top: -1px; margin-bottom: -1px; input { padding: 0 !important; width: calc(2ch + #{$o-we-sidebar-content-field-clickable-spacing * 2} - #{$o-we-sidebar-content-field-border-width * 2}); } } &.dropdown-toggle::after { display: none; } input { background-color: unset; border: none; color: unset; padding: 0; text-align: center; width: calc(2ch + #{$o-we-sidebar-content-field-clickable-spacing * 2}); } } we-customizeblock-option { grid-area: options; padding-left: 0; padding-right: 0; we-title { &.o_short_title { width: unset !important; padding-right: 0 !important; } &.o_long_title { width: fit-content !important; padding-right: 10px !important; } } .highlighted-text { color: white; font-weight: bold; padding: 1px; } .dropdown { position: unset; width: 100%; .dropdown-toggle { padding: 0; width: 100%; &::after { display: none; } } .dropdown-menu.show { position: absolute !important; padding: 0; width: 100%; border-color: $o-we-dropdown-border-color; &[data-popper-placement$="start"] { left: -$o-we-sidebar-content-padding-base !important; } we-button:not(.fa) { display: flex; align-items: center; height: $o-we-sidebar-content-field-dropdown-item-height; text-align: left; font-family: $o-we-font-family; font-size: 12px; font-weight: 400; div { width: 100%; } } .dropdown-item::before { display: none; } } } input::placeholder { font-style: italic; } we-input:not(.o_we_small_input) { &, div, input { width: 100% !important; } } & ~ we-customizeblock-option { grid-area: options2; & ~ we-customizeblock-option { grid-area: options3; } } } #colorInputButtonGroup { position: static; grid-area: colors; .dropdown-toggle:after { display: none; // remove ballon } .colorpicker-group { display: flex; align-items: stretch; position: static; } #oe-text-color { border-right:0; @include border-end-radius(0); } #oe-fore-color { @include border-start-radius(0); } } .btn + .btn { @include border-start-radius(0); } .btn-group > .btn:not(:last-of-type) { @include border-end-radius(0); } #list { grid-area: list; } #link { grid-area: link; #unlink { display: none; } } #font-size { grid-area: size; } #decoration { grid-area: style; } #style { grid-area: typo; .dropdown-toggle { justify-content: space-between; span { overflow: hidden; text-overflow: ellipsis; color: white; pre, blockquote { padding: 0; border: 0; color: inherit; } } } } #justify { grid-area: align; .dropdown-menu { padding: 0; .btn { padding:$o-we-sidebar-content-field-height * .3 $o-we-sidebar-content-field-height * .5; border-width: 0; &:hover { z-index: 0; } + .btn { border-left-width: 1px; } } } } #chatgpt { grid-area: ai; } #translate { grid-area: translate; } #animate { grid-area: animate; } #highlight { grid-area: hilight; } #chatgpt, #animate, #highlight { .fa { margin-right: $o-we-item-spacing * 0.25; } } .dropdown-menu.colorpicker-menu { min-width: 0; max-height: none; left: $o-we-sidebar-content-indent; right: $o-we-sidebar-content-padding-base; border: $o-we-sidebar-content-field-dropdown-border-width solid $o-we-sidebar-content-field-dropdown-border-color; border-radius: $o-we-item-border-radius; padding: 0; } :not(.dropup) > .dropdown-menu.colorpicker-menu { top: 2em; // TODO Ugly and not precise, conflict with row-gap of grid } } // Firefox layout issue // Somehow fields on this row take a very wide space. // Could be related to the 999px width of the border previews. .link-custom-color-border { we-input, we-select { max-width: max-content; } we-toggler { width: 85px !important; } } // END toolbar #oe-table-options { @extend we-customizeblock-option; .btn { @extend %we-generic-button; } .oe-table-row { @extend we-row; } .oe-table-label { @extend we-title; } } we-button.o_we_link { @extend %we-generic-link; margin-top: 0; border: 0; padding: 0; background: 0; } we-toggler { @include we-icon-button('\f0d7'); &.o_we_toggler_pager { @include we-icon-button('\f105'); } text-align: left; > img, > svg { max-width: 100%; } + * { display: none; border: $o-we-sidebar-content-field-dropdown-border-width solid $o-we-sidebar-content-field-dropdown-border-color; border-radius: $o-we-item-border-radius; background-color: $o-we-sidebar-content-field-dropdown-bg; box-shadow: $o-we-sidebar-content-field-dropdown-shadow; } &.active { @include we-icon-button('\f0d8'); + * { display: block; } + .o_we_has_pager { display: flex; flex-direction: column; } } } %we-icon-button { position: relative; &::after { @include o-position-absolute(50%, $o-we-sidebar-content-field-control-item-spacing); transform: translateY(-50%); width: $o-we-sidebar-content-field-control-item-size; text-align: center; font-family: FontAwesome; } } we-title { display: block; text-align: left; } we-customizeblock-options { position: relative; display: block; padding: 0 0 ($o-we-sidebar-content-block-spacing * 1.5) 0; background-color: $o-we-bg-lighter; > we-title { display: flex; align-items: center; padding: $o-we-sidebar-content-block-spacing * .3 $o-we-sidebar-content-padding-base 0 $o-we-sidebar-content-indent; background-color: $o-we-bg-light; font-size: $o-we-sidebar-content-main-title-font-size; > span { @include o-text-overflow(); flex: 1 1 auto; // Make it full-width so that it is easier to click on cursor: pointer; color: $o-we-sidebar-content-main-title-color !important; line-height: $o-we-sidebar-content-main-title-height; } > we-top-button-group { flex: 0 0 auto; display: flex; margin-left: auto; font-size: .9em; .oe_snippet_remove { font-size: 1.2em; } we-customizeblock-option { display: flex; padding: 0; } we-button { margin-top: 0 !important; margin-left: $o-we-sidebar-content-field-multi-spacing; padding: 0 $o-we-sidebar-content-field-multi-spacing !important; &.fa, &.o_we_icon_button { box-sizing: content-box; width: 1.29em; // Fix width and override potential fa-fw padding: 0 0.15em !important; margin-left: $o-we-sidebar-content-field-label-spacing; text-align: center; justify-content: center; } } } } &.o_we_outdated_block_options { // Outdated block options padding: 0 !important; > we-customizeblock-option { &:not(.snippet-option-VersionControl) { display: none !important; } &.snippet-option-VersionControl { // Outdated snippet alert padding: 0 !important; } } } } we-customizeblock-option { position: relative; display: block; padding: 0 $o-we-sidebar-content-padding-base 0 $o-we-sidebar-content-indent; .dropdown-menu { // FIXME temporary fix for m2o option for example position: static !important; } > we-alert { background-color: $o-we-color-info; display: block; padding: $o-we-sidebar-content-field-label-spacing; we-title { margin-bottom: $o-we-sidebar-content-field-label-spacing; text-transform: uppercase; font-weight: bold; } } > we-title { margin-bottom: $o-we-sidebar-content-field-spacing * -0.5; font-size: $o-we-sidebar-font-size + 1; color: $o-we-fg-lighter; font-weight: 500; &:not(:first-child) { margin-top: $o-we-sidebar-content-field-spacing * 2; } } } .o_we_fold_icon { @include o-position-absolute(0, 100%, 0, -$o-we-sidebar-content-indent); display: flex; justify-content: center; align-items: center; width: $o-we-sidebar-content-indent; @extend %we-generic-link; } //---------------------------------------------------------------------- // User Value Widgets //---------------------------------------------------------------------- .o_we_user_value_widget { @extend %o-we-inline; margin-top: $o-we-sidebar-content-field-spacing; > div { display: flex; align-items: center; min-height: $o-we-sidebar-content-field-height; } } .o_we_large > div { flex: 1 1 auto !important; width: 100%; } // Buttons we-button.o_we_user_value_widget { > div { // Needed otherwise cannot work because of flex display @include o-text-overflow(block); min-height: $o-we-sidebar-content-field-height - 2 * $o-we-sidebar-content-field-border-width; &, > .fa { line-height: $o-we-sidebar-content-field-height - 2 * $o-we-sidebar-content-field-border-width; } > img { margin-bottom: 1px; // Not sure why but not really centered otherwise } > svg { margin-bottom: 2px; // Not sure why but not really centered otherwise } } &.fa, &.oi { > div { display: none; } } } we-button { // Prevent icon buttons to shrink &.o_we_icon_button, &.fa { flex: 0 0 auto; } // Buttons being `fa-fw`, prevent font-awesome hardcoded width &.fa-fw, &.oi-fw { padding: 0 .5em; width: 2.29em; // .fa-fw = 1.28571429em (font-awesome.css) justify-content: center; } } // Checkboxes we-button.o_we_checkbox_wrapper.o_we_user_value_widget { min-width: $o-we-sidebar-content-field-toggle-width; padding: 0; border: none; background: none; cursor: default; > we-title { cursor: pointer; } > div { display: flex; min-height: $o-we-sidebar-content-field-height; line-height: $o-we-sidebar-content-field-height; } we-checkbox { flex: 0 0 auto; display: flex; align-items: center; width: $o-we-sidebar-content-field-toggle-width; height: $o-we-sidebar-content-field-toggle-height; background-color: $o-we-sidebar-content-field-toggle-bg; border-radius: 10rem; cursor: pointer; &::after { content: ""; display: block; width: $o-we-sidebar-content-field-toggle-control-width; height: $o-we-sidebar-content-field-toggle-control-height; border-radius: 10rem; background-color: $o-we-sidebar-content-field-toggle-control-bg; } } &.active we-checkbox { background-color: $o-we-sidebar-content-field-toggle-active-bg; justify-content: flex-end; } &.active, &:hover { color: $o-we-sidebar-content-field-clickable-color; } } // Selection (select and button groups) we-selection-items { .o_we_user_value_widget { margin-top: 0; flex-grow: 1; } } // Selects we-select.o_we_user_value_widget { position: relative; &:not(.o_we_icon_select) we-toggler { @include large-component(); } &:not(.o_we_select_pager).o_we_widget_opened .o_we_dropdown_caret { position: relative; display: block; align-self: flex-end; &::before, &::after { content: ''; $-toggler-caret-size: 2 * $o-we-sidebar-content-field-control-item-spacing + $o-we-sidebar-content-field-control-item-size; @include o-position-absolute(100%, $-toggler-caret-size); z-index: $zindex-dropdown + 1; transform: translateX(50%); margin-top: $o-we-dropdown-caret-spacing; border-bottom: ($o-we-item-spacing + $o-we-sidebar-content-field-dropdown-border-width - $o-we-dropdown-caret-spacing) solid $o-we-dropdown-border-color; border-left: $o-we-item-spacing solid transparent; border-right: $o-we-item-spacing solid transparent; } &::after { border-bottom-color: $o-we-sidebar-content-field-dropdown-item-bg; border-left-width: ($o-we-item-spacing - 1px); border-right-width: ($o-we-item-spacing - 1px); } } // Special buttons (e.g. remove/position) next to the we-select // should be toned down. Also makes sure that only one button is // targeted, and that should be the last one. &:not(.o_we_so_color_palette) ~ we-button:not(:hover):not(.o_we_image_shape_remove):last-child { background: none; } we-toggler:empty::before { content: attr(data-placeholder-text); } we-selection-items { &:not(.o_we_has_pager) { @include o-position-absolute(100%, 0, auto, 0); z-index: $zindex-dropdown; max-height: 600px; overflow-y: auto; } &.o_we_has_pager { $o-offset-total-topbar: calc(#{$o-we-sidebar-top-height} + #{$o-we-sidebar-tabs-height}); width: $o-we-sidebar-width; max-height: calc(100% - #{$o-offset-total-topbar}); margin-top: $o-offset-total-topbar; we-title { padding: $o-we-sidebar-content-block-spacing * .3 $o-we-sidebar-content-padding-base 0 $o-we-sidebar-content-indent; background-color: $o-we-bg-light; line-height: $o-we-sidebar-content-main-title-height; } .o_pager_nav { background-color: $o-we-bg-light; > div:first-child { padding-left: $o-we-item-spacing * 1.5; padding-top: $o-we-item-spacing; } } .o_pager_nav_title { padding-left: $o-we-item-spacing * 1.5; } .o_pager_nav_angle { @extend %we-generic-clickable; @include button-variant($o-we-bg-light, $o-we-bg-light); padding: $o-we-item-spacing / 2; font-size: $o-we-sidebar-font-size * 1.4; } .o_pager_nav_btn { @extend %we-generic-tab-button; &:focus { box-shadow: none; } } .o_pager_container { overflow-y: scroll; scroll-behavior: smooth; background-color: $o-we-bg-lighter; } } &:not(.dropdown-menu):not(.o_we_has_pager) { margin-top: $o-we-sidebar-content-field-dropdown-spacing; } &:empty { line-height: $o-we-sidebar-content-field-dropdown-item-height; background-color: $o-we-sidebar-content-field-dropdown-item-bg; color: $o-we-sidebar-content-field-dropdown-item-color; // Padding from we-icon-button mixin. padding-left: 2 * $o-we-sidebar-content-field-control-item-spacing + $o-we-sidebar-content-field-control-item-size; &::before { content: attr(data-placeholder-text); } } > we-title { line-height: $o-we-sidebar-content-field-dropdown-item-height; } > we-button { @include we-icon-button('', $align: left); // Always a padding on the left border: none; background: none; background-clip: padding-box; background-color: $o-we-sidebar-content-field-dropdown-item-bg; color: $o-we-sidebar-content-field-dropdown-item-color; border-radius: 0; text-align: left; > we-title { flex-grow: 1; } > div, > we-title { line-height: $o-we-sidebar-content-field-dropdown-item-height; img, svg { max-width: 100%; } } &.o_we_badge_at_end > div { display: flex; width: 100%; justify-content: space-between; } &:not(.d-none) ~ we-button { // Use a border-top instead of a margin-top as when the // mouse goes from one select button to another, the // option preview should switch from the first button's // option to the second one without reset to selected // state in between. border-top: $o-we-sidebar-content-field-dropdown-item-spacing solid transparent; } &:hover { background-color: $o-we-sidebar-content-field-dropdown-item-bg-hover; color: $o-we-sidebar-content-field-dropdown-item-hover-color; } &.active { @include we-icon-button('\f00c', $align: left); background-color: $o-we-sidebar-content-field-dropdown-item-active-bg; color: $o-we-sidebar-content-field-dropdown-item-active-color; &:after { color: $o-we-accent; } } } } // When the dropdown or the colorpicker is displayed above the // selector. &.o_we_select_dropdown_up { we-selection-items { top: auto !important; bottom: 100% !important; margin-bottom: $o-we-sidebar-content-field-dropdown-spacing !important; } .o_we_dropdown_caret { align-self: flex-start !important; &::before, &::after { top: auto !important; bottom: 100% !important; margin-bottom: $o-we-dropdown-caret-spacing; transform: rotate(180deg) translateX(-50%) !important; } } &.o_we_so_color_palette .o_we_dropdown_caret { &::before, &::after { margin-bottom: $o-we-dropdown-caret-spacing / 2; } } } we-select-page { display: grid; grid-template-columns: repeat(4, 1fr); gap: $o-we-item-spacing / 2; padding: $o-we-item-spacing; background-color: $o-we-bg-lighter; we-button { @extend %o-preview-alpha-background; padding: $o-we-item-spacing; background-color: transparent; } // For background shapes we-button[data-shape] { grid-column: span 4; padding: 0; div { width: 100%; height: 75px; } } we-button.active { outline: 4px solid $o-we-color-success; outline-offset: -4px; background-color: rgba($o-we-color-success, 0.2); } img { width: 100%; aspect-ratio: 1; object-fit: contain; } } } we-button.o_we_image_shape_remove { div { display: flex; } } // Button groups we-button-group.o_we_user_value_widget { we-selection-items { display: flex; flex-grow: 1; max-width: 100%; we-button { padding: 0 $o-we-sidebar-content-field-button-group-button-spacing; border-radius: 0; + we-button { border-left: none; } &:first-child, .active:first-child { @include border-start-radius($o-we-sidebar-content-field-border-radius); } &:last-child, .active:last-child { @include border-end-radius($o-we-sidebar-content-field-border-radius); } } } } // Only when main option (not in a we-row or something like that...) we-customizeblock-option > we-button-group.o_we_user_value_widget we-selection-items { @include large-component(); we-button { display: flex; justify-content: center; flex: 1 1 percentage(1/4); padding: ($o-we-sidebar-content-field-button-group-button-spacing / 4) ($o-we-sidebar-content-field-button-group-button-spacing / 3); } } // Inputs we-input.o_we_user_value_widget { @extend %we-generic-text-input; > div { flex: 0 1 auto; width: $o-we-sidebar-content-field-input-max-width; } input { flex: 1 1 auto; width: 0; min-width: 2ch; height: $o-we-sidebar-content-field-height - 2 * $o-we-sidebar-content-field-border-width; font-family: $o-we-sidebar-content-field-input-font-family; &::placeholder { color: $o-we-sidebar-content-field-control-item-color; } } span { flex: 0 0 auto; padding-right: $o-we-sidebar-content-field-label-spacing; font-size: $o-we-sidebar-content-field-input-unit-font-size; color: $o-we-sidebar-content-field-control-item-color; } } // Color Pickers .o_we_so_color_palette.o_we_user_value_widget { .o_we_color_preview { @extend %o-preview-alpha-background; flex: 0 0 auto; display: block; width: $o-we-sidebar-content-field-colorpicker-size; height: $o-we-sidebar-content-field-colorpicker-size; border: $o-we-sidebar-content-field-border-width solid $o-we-bg-darkest; border-radius: 10rem; cursor: pointer; &::after { box-shadow: $o-we-sidebar-content-field-colorpicker-shadow; } } &.o_we_widget_opened { .o_we_color_preview { border: 2px solid $o-we-accent; } // "span" added to make the selector more specific span.o_we_dropdown_caret { &::before, &::after { right: $o-we-sidebar-content-field-colorpicker-size / 2; } &::after { border-bottom-width: ($o-we-item-spacing + $o-we-sidebar-content-field-dropdown-border-width - $o-we-dropdown-caret-spacing) + 1px; // 1px = colorpicker inset box-shadow... } } } we-toggler { display: none; } } // Matrix (e.g. Chart Snippet) we-matrix { overflow-y: auto; table { table-layout: fixed; width: 100%; td, th { text-align: center; we-button { display: inline-block; color: inherit; height: 100%; &.o_we_matrix_remove_col, &.o_we_matrix_remove_row { display: none; } } input { border: $o-we-sidebar-content-field-border-width solid $o-we-sidebar-content-field-border-color; background-color: $o-we-sidebar-content-field-input-bg; color: inherit; font-size: 12px; width: 100%; } &:last-child { width: 28px; } } tr:last-child we-button { overflow: visible; } } } // Progress bar widget we-range.o_we_user_value_widget { &[data-display-range-value] { input[type="range"] { // Needed because without it the output overflows to the right // and makes a horizontal scrollbar appear on // 'o_we_customize_panel' if 'o_we_customize_panel' already has // a vertical scrollbar. min-width: 0; } } input[type="range"] { @include large-component(); height: $o-we-sidebar-content-field-height; padding: 0 $o-we-item-border-width 0 0; background-color: transparent; appearance: none; &:focus { outline: none; &::-webkit-slider-thumb { box-shadow: none; } &::-moz-range-thumb { box-shadow: none; } &::-ms-thumb { box-shadow: none; } } &::-moz-focus-outer { border: 0; } &::-webkit-slider-thumb { width: $o-we-sidebar-content-field-progress-control-height; height: $o-we-sidebar-content-field-progress-control-height; margin-top: ($o-we-sidebar-content-field-progress-height - $o-we-sidebar-content-field-progress-control-height) / 2; border: none; border-radius: 10rem; background-color: $o-we-sidebar-content-field-progress-active-color; box-shadow: none; appearance: none; &:active { background-color: $o-we-sidebar-content-field-progress-active-color; } } &::-webkit-slider-runnable-track { width: 100%; height: $o-we-sidebar-content-field-progress-height; cursor: pointer; // Unfortunately, Chrome does not support customizing the lower part of the track background-color: $o-we-sidebar-content-field-progress-color; border-color: transparent; border-radius: 10rem; box-shadow: none; position: relative; // z-index: 1000; } &::-moz-range-thumb { width: $o-we-sidebar-content-field-progress-control-height; height: $o-we-sidebar-content-field-progress-control-height; border: none; border-radius: 10rem; background-color: $o-we-sidebar-content-field-progress-active-color; box-shadow: none; appearance: none; &:active { background-color: $o-we-sidebar-content-field-progress-active-color; } } &::-moz-range-track { width: 100%; height: $o-we-sidebar-content-field-progress-height; cursor: pointer; background-color: $o-we-sidebar-content-field-progress-color; border-color: transparent; border-radius: 10rem; box-shadow: none; } &::-moz-range-progress { background-color: $o-we-sidebar-content-field-progress-active-color; height: $o-we-sidebar-content-field-progress-height; border-color: transparent; border-radius: 10rem; } &::-ms-thumb { width: $o-we-sidebar-content-field-progress-control-height; height: $o-we-sidebar-content-field-progress-control-height; margin-top: 0; margin-right: 0; margin-left: 0; border: none; border-radius: 10rem; background-color: $o-we-sidebar-content-field-progress-active-color; box-shadow: none; appearance: none; &:active { background-color: $o-we-sidebar-content-field-progress-active-color; } } &::-ms-track { width: 100%; height: $o-we-sidebar-content-field-progress-height; cursor: pointer; background-color: transparent; border-color: transparent; border-width: $o-we-sidebar-content-field-progress-control-height / 2; box-shadow: none; } &::-ms-fill-lower { background-color: $o-we-sidebar-content-field-progress-active-color; border-radius: 10rem; @include border-radius($form-range-track-border-radius); } &::-ms-fill-upper { background-color: $o-we-sidebar-content-field-progress-color; border-radius: 10rem; } &.o_we_inverted_range { transform: rotate(180deg); &::-moz-range-track { background-color: $o-we-sidebar-content-field-progress-active-color; } &::-moz-range-progress { background-color: $o-we-sidebar-content-field-progress-color; } &::-ms-fill-lower { background-color: $o-we-sidebar-content-field-progress-color; } &::-ms-fill-upper { background-color: $o-we-sidebar-content-field-progress-active-color; } } } } // Lists we-list { > div { flex-flow: row wrap; } .o_we_table_wrapper { width: 100%; max-height: 200px; overflow-y: auto; table { table-layout: auto; width: 100%; margin-bottom: $o-we-sidebar-content-field-spacing / 2; &:empty { margin-bottom: 0; } input { width: 100%; border: $o-we-sidebar-content-field-border-width solid $o-we-sidebar-content-field-border-color; border-radius: $o-we-sidebar-content-field-border-radius; padding: 0 $o-we-sidebar-content-field-clickable-spacing; background-color: $o-we-sidebar-content-field-input-bg; color: inherit; font-family: $o-we-sidebar-content-field-input-font-family; } tr { // Since the sortable list's