summaryrefslogtreecommitdiff
path: root/lib/dijit/themes/claro/Tree.less
blob: 4e639ca4fe10d610667a5fbee77f4188535d9dc5 (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
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
128
129
130
131
132
133
/* Tree 
 * 
 * Styling Tree mostly means styling the TreeRow (dijitTreeRow)
 * There are 4 basic states to style:
 * 
 * Tree Row:
 * 1. tree row (default styling): 
 * 		.dijitTreeRow - styles for each row of the tree
 *
 * 2. hovered tree row (mouse hover on a tree row)
 * 		.dijitTreeRowHover - styles when mouse over on one row
 * 
 * 3. active tree row (mouse down on a tree row)
 * 		.dijitTreeRowActive - styles when mouse down on one row
 * 
 * 4. selected tree row
 * 		dijitTreeRowSelected - style when the row has been selected
 * 
 * Tree Expando:
 * 	    dijitTreeExpando - the expando at the left of the text of each tree row
 * 
 * Drag and Drop on TreeNodes: (insert line on dijitTreeContent node so it'll aligned w/ target element)
 * 		.dijitTreeNode .dojoDndItemBefore/.dojoDndItemAfter - use border style simulate a separate line
 */

@import "variables";

.claro .dijitTreeNode {
    zoom: 1;	/* force layout on IE (TODO: may not be needed anymore) */
}
.claro .dijitTreeIsRoot {
    background-image: none;
}

/* Styling for basic tree node (unhovered, unselected)
 * Also use this styling when dropping between items on the tree (in other words, don't
 * use hover effect)
 */
.claro .dijitTreeRow,
.claro .dijitTreeNode .dojoDndItemBefore,
.claro .dijitTreeNode .dojoDndItemAfter {
	/* so insert line shows up on IE when dropping after a target element */
	padding: 4px 1px 2px 0;
	margin: 0 1px;	/* replaced by border for selected/hovered row */

	background-color: none;	// IE6 doesn't understand rgba() or transparent below
	background-color: transparent;	// IE8 doesn't understand rgba() below
	background-color: rgba(171,214,255,0);	// rgba() instead of transparent to prevent flash on hover fade-in
	background-image: url("images/commonHighlight.png");
	background-position:0 0;
	background-repeat:repeat-x;

	border-color: rgba(118,157,192,0);	// rgba() instead of none to prevent flash on hover fade-in
	border-width: 0;

	.transition-property(background-color, border-color);
	.transition-duration(.25s);
	.transition-timing-function(ease-out);
}
.dj_ie6 .claro .dijitTreeRow {
	background-image: none;
}

.claro .dijitTreeRowSelected {
	background-repeat:repeat-x;
	background-color:@selected-background-color;
	padding: 3px 0 1px;
	margin: 0;
	border:solid 1px @selected-border-color;
	color:@selected-text-color;
}
.claro .dijitTreeRowHover {
	background-color:@hovered-background-color;
	padding: 3px 0 1px;
	margin: 0;
	border:solid 1px @hovered-border-color;
	color:@hovered-text-color;
	.transition-duration(.25s);
}
.claro .dijitTreeRowActive {
	background-color:@pressed-background-color;
	background-position:0 -177px;
	padding: 3px 0 1px;
	margin-left: 0;
	border:solid 1px @pressed-border-color;
	color:@selected-text-color;
}
.dj_ie6 .claro .dijitTreeRowActive {
	background-image: none;
}
.claro .dijitTreeRowFocused {
	background-repeat: repeat;
}

/* expando (open/closed) icon */

.claro .dijitTreeExpando {
	background-image: url('images/treeExpandImages.png');
    width: 16px;
    height: 16px;
	background-position: -35px 0;		/* for dijitTreeExpandoOpened */
}
.dj_ie6 .claro .dijitTreeExpando {
	background-image: url('images/treeExpandImages8bit.png');
}
.claro .dijitTreeRowHover .dijitTreeExpandoOpened {
	background-position: -53px 0;
}
.claro .dijitTreeExpandoClosed {
	background-position: 1px 0;
}
.claro .dijitTreeRowHover .dijitTreeExpandoClosed {
	background-position: -17px 0;
}
.claro .dijitTreeExpandoLeaf,
.dj_ie6 .claro .dijitTreeExpandoLeaf {
	background-image:none;
}
.claro .dijitTreeExpandoLoading {
	background-image: url('images/loadingAnimation.gif');
}

/* Drag and Drop on TreeNodes
 * Put insert line on dijitTreeContent node so it's aligned w/
 * (ie, indented equally with) target element, even
 * though dijitTreeRowNode is the actual "drag object"
 */
.claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
	border-top: 2px solid @dnd-dropseparator-color;		// TODO: normal separator is just 1px, why is this 2px?
}
.claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
	border-bottom: 2px solid @dnd-dropseparator-color;	// TODO: normal separator is just 1px, why is this 2px?
}