forked from GetmeUK/ContentTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_inspector.scss
More file actions
127 lines (110 loc) · 3.4 KB
/
Copy path_inspector.scss
File metadata and controls
127 lines (110 loc) · 3.4 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
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
/**
* The inspector provides a breadcrumb style path (constructured from tags) for
* the currently selected element and its parent/ancestor tags.
*
* Tags can be selected which triggers the properties dialog. This allows
* elements which typically can't be directly selected using the editor to be
* modified.
*/
.ct-widget {
&.ct-inspector {
background: rgba($in-page-background, 0.2);
border-top: 1px solid rgba(lighten($in-page-background, 10%), 0.1);
bottom: 0;
height: 32px;
left: 0;
overflow: hidden;
padding: 3px 16px 0;
position: fixed;
width: 100%;
}
/**
* The inspector bar is consists of a list of one or more tags, each tag
* represents an element in the lineage between the currently selected
* element and the top level element it is defined within, e.g for a table
* division the path might look like this:
*
* table > tbody > tr > td
*/
.ct-inspector {
&__tags {
@include clearfix;
&:before {
color: $icon-color;
content: '\ea80';
display: block;
float: left;
height: 24px;
line-height: 24px;
margin-right: 16px;
text-align: center;
@include type-icons;
width: 24px;
}
}
}
.ct-tag {
$tag-height: 24px;
background-color: #2980b9;
border-radius: 2px 0 0 2px;
color: white;
cursor: pointer;
float: left;
font-weight: bold;
height: $tag-height;
line-height: $tag-height;
margin-left: $tag-height;
padding: 0 8px;
position: relative;
text-shadow: 0 1px 0 $shadow-color;
&:after {
border-style: solid;
border-bottom: ($tag-height / 2) solid rgba(255, 0, 0, 0);
border-left: ($tag-height / 2) solid #2980b9;
border-right: none;
border-top: ($tag-height / 2) solid rgba(255, 0, 0, 0);
content: '';
display: block;
height: $tag-height;
bottom: 0;
right: -$tag-height;
position: absolute;
width: $tag-height;
// HACK: Fix for appearance of border in FireFox
-moz-transform: scale(.9999);
}
&:first-child {
margin-left: 0;
}
&:hover {
background-color: lighten(#3498db, 5%);
&:after {
border-left-color: lighten(#3498db, 5%);
}
}
// Set the background colour for tags based on their position in the
// list, the list cycles round.
$tag-colors:
#8e44ad,
#2980b9,
#27ae60,
#d35400,
#f39c12,
#16a085;
@for $i from 1 through length($tag-colors) {
$tag-color: nth($tag-colors, $i);
&:nth-child(#{$i}) {
background-color: $tag-color;
&:after {
border-left-color: $tag-color;
}
&:hover {
background-color: lighten($tag-color, 5%);
&:after {
border-left-color: lighten($tag-color, 5%);
}
}
}
}
}
}