forked from phcode-dev/staging.phcode.dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExtn-CSSColorPreview.less
More file actions
62 lines (56 loc) · 1.46 KB
/
Extn-CSSColorPreview.less
File metadata and controls
62 lines (56 loc) · 1.46 KB
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
// These styles are for CssColorPreview feature
// Check `extensionsIntegrated/CSSColorPreview for more reference
/* Single color preview */
.CodeMirror .CodeMirror-colorGutter {
width: 1em;
background-color: transparent;
text-align: center;
}
.ico-cssColorPreview {
border: solid 1px rgba(255, 255, 255, 0.2);
.dark & {
border: solid 1px rgba(0, 0, 0, 0.2);
}
display: inline-block;
top: .1em;
height:.8em;
width: .8em;
position: relative;
pointer-events: auto;
}
/* Multiple colors preview container (this is a div) */
.ico-multiple-cssColorPreview {
border: solid .05em rgba(255, 255, 255, 0.2);
.dark & {
border: solid .05em rgba(0, 0, 0, 0.2);
}
position: relative;
display: inline-block;
top: .2em;
width: .9em;
height:.9em;
pointer-events: auto;
transition: all 0.3s ease;
}
.ico-multiple-cssColorPreview:hover {
top: -.8em;
width: 2em;
height:2em;
pointer-events: auto;
transition: all 0.3s ease;
}
/* For individual color boxes, they will be added inside the main .ico-multiple-cssColorPreview div */
.ico-multiple-cssColorPreview .color-box {
position: absolute;
width: .4em;
height: .4em;
box-sizing: border-box;
transition: all 0.3s ease;
}
.ico-multiple-cssColorPreview:hover .color-box {
position: absolute;
width: calc(1em - 1px);
height: calc(1em - 1px);
box-sizing: border-box;
transition: all 0.3s ease;
}