summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/special_fields.scss
blob: cabdf919c093d8ba7edde7ab160f86a58ea30891 (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
/*
 IFRAME WRAPPER SCSS
 */

$preview_height: 1123 + 32;
$preview_width: 794;
$preview_scale: 0.50;

@mixin o_preview_iframe_styling($scale) {

  .o_preview_iframe_wrapper {
    padding: 0;
    overflow: hidden;
    width: ($preview_width * $scale) + 0px;
    height: ($preview_height * $scale) + 0px;
    position: relative;
  }

  .o_preview_iframe {
    width: $preview_width + 0px;
    height: $preview_height + 0px;
    border: 2px solid lightgrey;
    overflow: hidden;

    padding-top: 16px;
    padding-bottom: 16px;

    -ms-zoom: 0.5;
    -moz-transform: scale($scale);
    -moz-transform-origin: 0 0;
    -o-transform: scale($scale);
    -o-transform-origin: 0 0;
    -webkit-transform: scale($scale);
    -webkit-transform-origin: 0 0;
  }

  .o_iframe_wrapper_spinner {
    position: absolute;
    left: (($preview_width * $scale) / 2) - 40 + 0px;
    top: (($preview_height * $scale) / 2) - 40 + 0px;
    // -40 for width/2 and height/2 of the spinner
  }

}


@include o_preview_iframe_styling($preview_scale)

@media (max-width: 1488px) {
  @include o_preview_iframe_styling($preview_scale * 0.80)
}

@media (max-width: 600px) {
  @include o_preview_iframe_styling($preview_scale * 0.60)
}