aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/base/escalator/escalator.scss
blob: c5b5d24fa456c0114fe880581c7cc61ab041a4f9 (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
134
135
136
137
@mixin base-escalator($primaryStyleName : v-escalator) {

$background-color: white;
$border-color: #aaa;

.#{$primaryStyleName} {
	position: relative;
	background-color: $background-color;
}

.#{$primaryStyleName}-scroller {
	position: absolute;
	overflow: auto;
	z-index: 20;
}

.#{$primaryStyleName}-scroller-horizontal {
	left: 0; /* Left position adjusted to align with frozen columns */
	right: 0;
	bottom: 0;
	overflow-y: hidden;
	-ms-overflow-y: hidden;
}

.#{$primaryStyleName}-scroller-vertical {
	right: 0;
	top: 0;    /* this will be overridden by code, but it's a good default behavior */
	bottom: 0; /* this will be overridden by code, but it's a good default behavior */
	overflow-x: hidden;
	-ms-overflow-x: hidden;
}

.#{$primaryStyleName}-tablewrapper {
	position: absolute;
	overflow: hidden;
}

.#{$primaryStyleName}-tablewrapper > table {
	border-spacing: 0;
	table-layout: fixed;
	width: inherit; /* a decent default fallback */
}

.#{$primaryStyleName}-headercorner,
.#{$primaryStyleName}-footercorner {
	position: absolute;
	right: 0;
	border: 1px solid $border-color;
	box-sizing: border-box;
}

.#{$primaryStyleName}-headercorner { top: 0; }
.#{$primaryStyleName}-footercorner { bottom: 0; }

.#{$primaryStyleName}-horizontalscrollbarbackground {
	position: absolute;
	bottom: 0;
	width: 100%;
}

.#{$primaryStyleName}-header,
.#{$primaryStyleName}-body,
.#{$primaryStyleName}-footer {
	position: absolute;
	left: 0;
	width: inherit;
	z-index: 10;
}

.#{$primaryStyleName}-header { top: 0; }
.#{$primaryStyleName}-footer { bottom: 0; }

.#{$primaryStyleName}-body {
	z-index: 0;
	top: 0;
	
	.#{$primaryStyleName}-row {
		position: absolute;
		top: 0;
		left: 0;
	}
}

.#{$primaryStyleName}-row {
	display: block;
	
	.v-ie8 &, .v-ie9 & {
		/* 
		 * Neither IE8 nor IE9 let table rows be longer than tbody, with only 
		 * "display: block". Moar hax. 
		 */
		float: left;
		clear: left;
		
		/* 
		 * The inline style of margin-top from the <tbody> to offset the 
		 * header's dimension is, for some strange reason, inherited into each
		 * contained <tr>. We need to cancel it:
		 */
		margin-top: 0;
	}

	> td, > th {
		/* IE8 likes the bgcolor here instead of on the row */
		background-color: $background-color;
	}
}


.#{$primaryStyleName}-row {
	width: inherit;
}

.#{$primaryStyleName}-cell {
	display: block;
	float: left;
	border: 1px solid $border-color;
	padding: 2px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	overflow:hidden;
	
	/* 
	 * Because Vaadin changes the font size after the initial render, we
	 * need to mention the font size here explicitly, otherwise automatic
	 * row height detection gets broken.
	 */
	font-size: $font-size; 
}

.#{$primaryStyleName}-cell.frozen {
	position: relative;
	z-index: 1;
}

}