Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/**
2
 * Tour step must sit above all other UI components.
3
 * The backdrop is the lowest point in the tour.
4
 * Everything else is in the container, and the target background should be at the same z-index.
5
 * ----- moodle
6
 *  ---- step backdrop
7
 *   --- step container
8
 *   --- step target background
9
 */
10
$flexitour-base-zindex: 1040;
11
 
12
// The backdrop is the backdrop used in 'modal' step display.
13
div[data-flexitour="backdrop"] {
14
    background-color: #{$modal-backdrop-bg};
15
    opacity: #{$modal-backdrop-opacity};
16
 
17
    // The backdrop needs to have a lower z-index than everything else in the tour, but higher than everything else in Moodle.
18
    z-index: #{$flexitour-base-zindex};
19
}
20
 
21
// The step-background is used to highlight the region targetted in the step.
22
div[data-flexitour="step-background-fader"],
23
div[data-flexitour="step-background"] {
24
    @include border-radius($border-radius-lg);
25
 
26
    // The step container, and the target background should be at the same z-index.
27
    padding: 10px;
28
    z-index: ($flexitour-base-zindex + 1);
29
}
30
 
31
span[data-flexitour="container"],
32
div[data-flexitour="step-background-fader"],
33
[data-flexitour="step-backdrop"] > td,
34
[data-flexitour="step-backdrop"] {
35
    // The step container, and the target background should be at the same z-index.
36
    z-index: ($flexitour-base-zindex + 2);
37
}
38
 
39
span[data-flexitour="container"] {
40
    .modal-dialog {
41
        /**
42
         * Remove all margins to:
43
         * 1) ensure that the arrow touches the target; and
44
         * 2) ensure that the focus border touches the modal.
45
         */
46
        margin: 0;
47
    }
48
 
49
    div[data-role="arrow"] {
50
        border-width: $popover-arrow-width;
51
    }
52
 
53
    div[data-role="arrow"],
54
    div[data-role="arrow"]:after {
55
        position: absolute;
56
        display: block;
57
        width: 0;
58
        height: 0;
59
        border-color: transparent;
60
        border-style: solid;
61
        border-width: #{$popover-arrow-width};
62
    }
63
 
64
    // We need to know the opposite sides for arrow placement.
65
    $opposites:
66
        (
67
            top: bottom,
68
            bottom: top,
69
            left: right,
70
            right: left,
71
        );
72
 
73
    // These are the next leading side and allow for placement half-way along the step dialogue.
74
    $sides:
75
        (
76
            top: left,
77
            bottom: left,
78
            left: top,
79
            right: top,
80
        );
81
 
82
    @each $direction in map-keys($opposites) {
83
        $opposite: map_get($opposites, $direction);
84
        $side: map_get($sides, $direction);
85
        $oppositeside: map_get($opposites, $side);
86
 
87
        &[x-placement="#{$direction}"],
88
        &[x-placement="#{$direction}-start"] {
89
            margin-#{$opposite}: #{$popover-arrow-width};
90
            div[data-role="arrow"] {
91
                #{$opposite}: -$popover-arrow-width;
92
                #{$side}: 50%;
93
                margin-#{$side}: -$popover-arrow-width;
94
                border-#{$opposite}-width: 0;
95
                border-#{$direction}-color: #{$popover-arrow-outer-color};
96
            }
97
            div[data-role="arrow"]:after {
98
                #{$opposite}: 1px;
99
                margin-#{$side}: -#{$popover-arrow-width};
100
                content: " ";
101
                border-#{$opposite}-width: 0;
102
                border-#{$direction}-color: #{$popover-arrow-color};
103
            }
104
        }
105
    }
106
 
107
    // RTL specific styles.
108
    .dir-rtl & {
109
        &[x-placement^="right"] {
110
            margin-left: $popover-arrow-width;
111
            div[data-role="arrow"] {
112
                transform: rotate(180deg);
113
                left: -$popover-arrow-width;
114
                right: auto;
115
            }
116
        }
117
        &[x-placement^="left"] {
118
            margin-right: $popover-arrow-width;
119
            div[data-role="arrow"] {
120
                transform: rotate(180deg);
121
                left: auto;
122
                right: -$popover-arrow-width;
123
            }
124
        }
125
    }
126
}
127
 
128
// Hack the bone! Hack the bone!
129
[data-region="drawer"] [data-flexitour="container"] {
130
    /*rtl:ignore*/
131
    margin-left: -15px;
132
    width: $drawer-width - 10px;
133
}