/
umb-editor.less
127 lines (103 loc) · 2.43 KB
/
umb-editor.less
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.umb-editors {
.absolute();
overflow: hidden;
z-index: 7500;
.umb-editor {
box-shadow: 0px 0 30px 0 rgba(0,0,0,.3);
position: fixed;
}
}
.umb-editor {
.absolute();
background: @brownGrayLight;
z-index: @zIndexEditor;
max-width: 100%;
&--infiniteMode {
transform: none;
will-change: transform;
transition: transform 400ms ease-in-out;
&.umb-editor--moveRight {
transform: translateX(110%);
}
}
&--outOfRange {
transform: none;
display: none;
will-change: auto;
transition: display 0s 320ms;
}
&--level0 {
transform: none;
}
&--small .umb-property {
.control-header {
float: none;
width: 100%;
}
.controls {
margin-left: 0;
}
}
}
// use a loop to build the editor levels
@iterations: 3;
@step: 60px;
.level-loop (@i) when (@i > 0) {
@x: (@i * @step);
.umb-editor--level@{i} {
transform: translateX(@x);
}
.umb-editor--n@{i} {
right:@x;
}
.level-loop((@i - 1));
}
.level-loop(@iterations);
// and also use a loop to build editor sizes - easily extended with new sizes by adding to the map
@editorSizes:
small 500px,
medium 800px,
large 1600px;
.create-editor-sizes(@iterator:1) when(@iterator <= length(@editorSizes)) {
.umb-editor {
@size: extract(extract(@editorSizes, @iterator), 1);
@value: extract(extract(@editorSizes, @iterator), 2);
&--@{size} {
width: @value;
will-change: transform;
left: auto;
.umb-editor--container {
max-width: @value;
}
}
}
.create-editor-sizes((@iterator + 1));
}
.create-editor-sizes();
.umb-editor--large {
max-width: 1600px;
width: calc(100% - 50px);
}
.umb-editor__overlay {
.absolute();
background: rgba(0,0,0,0.4);
z-index: @zIndexEditor;
visibility: hidden;
opacity: 0;
transition: opacity 320ms 20ms, visibility 0s 400ms;
}
#contentcolumn > .umb-editor__overlay,
.umb-editor--notInFront .umb-editor__overlay {
visibility: visible;
opacity: 1;
transition: opacity 320ms 20ms, visibility 0s;
}
.umb-editor--trashed-message {
background:@errorBackground;
color:@errorText;
padding:10px;
margin-bottom:20px;
i {
margin-right:5px;
}
}