summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_popup/001.scss
blob: f8ae94ca632e69a853993d63659d10f93e3fec2d (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
.s_popup[data-vcss='001']  {
    .modal-content {
        min-height: $font-size-lg * 2;
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: $modal-content-box-shadow-sm-up;
    }

    .modal-dialog {
        height: auto;
        min-height: 100%;
    }

    // Close icon
    .s_popup_close {
        z-index: $zindex-modal;
        @include o-position-absolute(0, 0);
        width: $font-size-lg * 2;
        height: $font-size-lg * 2;
        line-height: $font-size-lg * 2;
        @include o-bg-color(color-yiq(o-color('primary')), o-color('primary'), $with-extras: false);
        box-shadow: $box-shadow-sm;
        cursor: pointer;
        font-size: $font-size-lg;
        text-align: center;
    }

    // Size option - Full
    .s_popup_size_full {
        padding: 0 !important;
        max-width: 100%;

        > .modal-content {
            // Use the backdrop color as background-color
            background-color: transparent;
            box-shadow: none;
            border-radius: 0;
        }
    }

    // Position option - Middle
    .s_popup_middle .modal-dialog {
        align-items: center;
    }

    // Position option - Top/Bottom
    .s_popup_top,
    .s_popup_bottom {
        .modal-dialog {
            margin-right: 0;
            &:not(.s_popup_size_full) {
                padding: $spacer !important;
            }
        }
    }
    .s_popup_top .modal-dialog {
        align-items: flex-start;
    }
    .s_popup_bottom .modal-dialog {
        align-items: flex-end;
    }

    // No backdrop
    .s_popup_no_backdrop {
        pointer-events: none;

        .modal-content {
            pointer-events: auto;
        }
    }
}