summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_popup/000.scss
blob: 027381568599f886290f1eda049d23f9221adb78 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// s_popup
.s_popup_main:not([data-vcss]) {
    .s_popup_content {
        // keep lower than <p> height (cookies bar)
        min-height: $o-font-size-base * $o-line-height-base;
        box-shadow: $modal-content-box-shadow-sm-up;
        .container {
            // keep margin when fixed bottom
            @include make-container();
        }
    }

    &.modal:not(.d-none) {
        display: block !important;
    }

    $popup-close-size: 1.5rem;
    .s_popup_close {
        position: absolute;
        background: white;
        height: $popup-close-size;
        width: $popup-close-size;
        line-height: $popup-close-size;
        margin-top: -1 * $popup-close-size / 2;
        margin-right: -1 * $popup-close-size / 2;
        border-radius: $popup-close-size / 2;
        right: 0px;
        top: 0px;
        box-shadow: rgba(0,0,0,0.8) 0 0 5px;
        cursor: pointer;
        text-align: center;
        z-index: 1;
        font-size: $popup-close-size;
    }

    &.s_popup_center {
        .s_popup_full {
            @include o-position-absolute(0, 0, 0, 0);
            &.modal-dialog {
                max-width: 100%;
                padding: 0 !important;
                margin: 0 !important;

                .modal-content {
                    height: 100%;
                    width: 100%;
                    justify-content: center;
                }
            }
            .s_popup_close {
                font-size: 60px;
                margin: 10px;
                background: none;
                box-shadow: none;
            }
        }
    }

    &.s_popup_fixed {
        &.s_popup_fixed_top {
            .s_popup_content {
                top: $o-navbar-height;
            }
        }
        &:not(.s_popup_fixed_top) {
            .s_popup_content {
                bottom: 0;
            }
        }
        .s_popup_content {
            z-index: $zindex-modal;
            position: fixed;
            right: 20px;
        }
        .modal-sm .s_popup_content {
            width: $modal-sm;
        }
        .modal-md .s_popup_content {
            width: $o-modal-md;
        }
        .modal-lg .s_popup_content {
            width: $o-modal-lg;
        }
        .modal-xl .s_popup_content {
            width: $modal-xl;
        }
        .s_popup_full .s_popup_content {
            right: 0;
            left: 0;
            .s_popup_close {
                box-shadow: none;
                font-size: 60px;
                margin: 10px;
                background: none;
            }

        }
    }
}