summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/scss/web_editor.frontend.scss
blob: 232b7b90b105d4b210faa104e881f5c81a6694e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@include media-breakpoint-down(sm) {
    img, .media_iframe_video, span.fa, i.fa {
        transform: none !important;
    }
}

.o_wysiwyg_loader {
    @extend :disabled;
    pointer-events: none;
    min-height: 100px;
    color: transparent;
}
.o_wysiwyg_loading {
    @include o-position-absolute($top: 50%, $left: 50%);
    transform: translate(-50%, -50%)
}

.ui-autocomplete {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;

    .ui-menu-item {
        padding: 0;
        > .ui-state-active {
            border: none;
            font-weight: normal;
            margin: 0;
        }
    }
}

// Background shapes
.o_we_shape {
    @extend %o-we-background-layer;

    @each $module, $shapes in $o-bg-shapes {
        @each $shape, $style in $shapes {
            $url-params: '';
            $colors: map-get($style, 'colors');
            @each $i in $colors {
                // %23 is the url-encoded form of '#' which doesn't work as is in urls.
                $color: str-replace("#{map-get($o-color-palette, "o-color-#{$i}")}", '#', '%23');
                $url-params: '#{$url-params}&c#{$i}=#{$color}';
            }

            // eg: o_website_shape_bg_1
            &.o_#{$module}_#{str-replace($shape, '/', '_')} {
                // When not customized, this URL, built in SCSS, allows for the
                // shape to be dynamic and adapted if future color changes.
                background-image: url("/web_editor/shape/#{$module}/#{$shape}.svg?#{str-slice($url-params, 2)}");
                background-position: map-get($style, 'position');
                background-size: map-get($style, 'size');
                @if map-get($style, 'repeat-y') {
                    background-repeat: repeat-y;
                }
            }
        }
    }
}
@include media-breakpoint-down(sm) {
    .o_we_shape {
        display: none;
    }
}
.o_we_flip_x {
    transform: scaleX(-1);
}
.o_we_flip_y {
    transform: scaleY(-1);
}
.o_we_flip_x.o_we_flip_y {
    transform: scale(-1);
}