forked from mozilla-b2g/gaia
/
grid.css
126 lines (111 loc) · 2.38 KB
/
grid.css
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
.apps {
width: 100%;
height: 100%;
z-index: 1;
}
/* pages */
.apps > div {
position: absolute;
width: 100%;
height: 100%;
text-align: center;
margin: 0 auto;
display: none;
}
/* Here users can view the clock while grid is loading -> better experience */
#landing-page {
display: block;
}
.apps ol {
width: -moz-calc(4 * 8rem);
padding: 0;
list-style-type: none;
display: block;
margin: 0 auto;
margin-top: .3rem;
}
.apps ol > li {
position: relative;
width: 8rem;
display: inline-block;
float: left;
text-align: center;
}
/* Maximum 16 icons for page */
.apps ol > li:nth-child(17) {
display: none;
}
/* Option to delete apps */
.apps ol > li span.options {
position: absolute;
top: 4.6rem;
left: 0;
width: 90%;
height: 2.6rem;
z-index: 2;
background: url(../resources/images/delete.png) no-repeat right top;
}
/* Container -> icon + label */
.apps ol > li > div {
height: 100%;
width: 100%;
margin-top: .5rem;
margin-bottom: .5rem;
pointer-events: none; /* NO touchable area */
}
/* Handling the case where the status bar is double size */
/* XXX remove when the homescreen layout gets more dynamic */
@media screen and (max-height: 440px) {
.apps ol > li > div {
margin-top: .2rem;
}
}
/* label wrapper */
.apps ol > li > div > span {
overflow: hidden; /* We cut the text to avoid messing up the grid */
word-wrap: break-word;
}
/* text label */
.apps ol > li > div > span > span {
font-size: -moz-calc(5.75 * 0.226rem); /* was 5pt */
text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
.labelWrapper {
color: #fff; /* App label color */
white-space: nowrap; /* NO new lines */
display: block;
width: 94%; /* At least 6% of margin between labels of different apps */
position: relative;
height: 1.6rem; /* 15px in otoro */
margin: 0 auto;
font-family: 'MozTT', sans-serif;
font-weight: 500;
}
/* Alternative icons when an app is being installed */
.loading:after {
margin: 8px;
content: "";
position: absolute;
left: 0px;
top: 0px;
z-index: 30000;
width: 6rem;
height: 6rem;
background: url('/style/images/loading_spinner.png');
animation: rotate 2.25s linear infinite;
}
body[data-transitioning] .loading:after {
animation-name: none;
}
.loading img {
margin-top: 0.4rem;
margin-left: -0.4rem;
}
@keyframes rotate {
from {
transform: rotate(1deg)
}
to {
transform: rotate(360deg)
}
}