forked from buildingfirefoxos/Building-Blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cross_browser.css
276 lines (230 loc) · 6.55 KB
/
cross_browser.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
/* ----------------------------------------------------------------- */
/* This CSS file will make your Firefox OS app using Building Blocks */
/* compatible with: ie 9, Firefox 18, Chrome 24, Safari 5.1 */
/* By Arnau March - @rnowm */
/* ----------------------------------------------------------------- */
/* Action menu */
form[role="dialog"][data-type="action"],
form[role="dialog"][data-type="object"],
form[role="dialog"][data-type="confirm"] {
background:
url(style/action_menu/images/ui/pattern.png) repeat left top,
url(style/action_menu/images/ui/gradient.png) no-repeat left top;
background-size: auto, 100%;
}
form[role="dialog"][data-type="action"] > header:first-child,
form[role="dialog"][data-type="object"] > header:first-child {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* Buttons */
button,
a[role="button"],
.button {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
button.danger:active,
a[role="button"].danger:active,
.button.danger:active {
background-image: none;
}
/* Confirm */
form[role="dialog"][data-type="confirm"] > section {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
form[role="dialog"][data-type="confirm"] menu button,
form[role="dialog"][data-type="edit"] menu button {
width: 48%;
float: left;
}
form[role="dialog"][data-type="confirm"] menu button:last-child,
form[role="dialog"][data-type="edit"] menu button:last-child {
float: right;
margin-left: 0;
}
form[role="dialog"][data-type="confirm"] menu button:first-child:last-child,
form[role="dialog"][data-type="edit"] menu button:first-child:last-child {
width: 100%;
}
/* Edit mode */
form[role="dialog"][data-type="edit"] header menu[type="toolbar"] button {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* headers */
section[role="region"] > header:first-child input[type="text"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
line-height: 3rem;
}
section[role="region"] > header:first-child menu[type="toolbar"] a,
section[role="region"] > header:first-child menu[type="toolbar"] button {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
section[role="region"] > header:first-child form button[type="reset"] {
background: url(style/headers/images/icons/clear.png) no-repeat center center;
background-size: 1.7rem auto;
}
section[role="region"] > header:first-child .icon {
background: transparent no-repeat center center;
background-size: 3rem auto;
}
/* Input areas */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
textarea:focus, input:focus{
outline: none;
}
fieldset legend {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
form[role="search"] p {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
form[role="search"] p input {
line-height: 3rem;
}
/* Switches */
label input[type="checkbox"][data-type="switch"] + span {
-moz-transition: background 0.2s ease, border 0.2s ease;
-webkit-transition: background 0.2s ease, border 0.2s ease;
}
label input[type="checkbox"][data-type="switch"].uninit + span {
-moz-transform: none;
-webkit-transform: none;
}
/* Drawer */
section[role="region"]:target {
-moz-transform: translateX(80%);
-webkit-transform: translateX(80%);
}
#drawer {
height: 100%;
}
#drawer div[role="main"] {
background: #fff;
height: 100%;
}
section[data-type="sidebar"] > header menu[type="toolbar"] a,
section[data-type="sidebar"] > header menu[type="toolbar"] button {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
section[data-type="sidebar"] > header {
background: url(style_unstable/drawer/images/ui/header.png) repeat-x left bottom;
background-size: 100% auto;
}
section[data-type="sidebar"] > header menu[type="toolbar"] a:last-child,
section[data-type="sidebar"] > header menu[type="toolbar"] button:last-child {
background: url(style_unstable/drawer/images/ui/separator.png) no-repeat left center;
background-size: auto 3.1rem;
}
section[data-type="sidebar"] > header .icon {
background: transparent no-repeat center center;
background-size: 100% auto;
}
section[data-type="sidebar"] > nav > ul > li > a {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* Progress and activity */
progress {
-webkit-appearance: none;
}
progress:not([value]) {
-webkit-animation: 0.9s rotate infinite steps(30);
}
progress:not([value])::-webkit-progress-bar {
background-color: transparent;
}
progress[value]::-webkit-progress-bar {
background: #333;
}
progress[value]::-webkit-progress-value {
background: #01c5ed;
}
progress[value].pack-activity::-webkit-progress-bar {
background-image: url(style_unstable/progress_activity/images/ui/activity.png);
-webkit-animation: 0.5s move infinite steps(15);
}
progress[value].pack-activity.light::-webkit-progress-bar {
background-color: #f4f4f4;
}
@-webkit-keyframes rotate {
from { -webkit-transform: rotate(1deg); }
to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes move {
from { background-position: 0 0; }
to { background-position: 1rem 0; }
}
/* Seek bars */
div[role="slider"] > div {
padding: 0 2rem;
}
div[role="slider"] progress::-webkit-progress-value {
height: 0.6rem;
top: -0.3rem;
position: relative;
}
div[role="slider"] button {
-moz-transition: border 0.15s ease;
-webkit-transition: border 0.15s ease;
background: url(style_unstable/seekbars/images/ui/handler.png) no-repeat center;
background-size: 2.8rem auto;
}
div[role="slider"] > label,
div[role="slider"] > label:first-of-type {
padding: 0;
}
/* Tabs */
[role="tablist"][data-items="2"] > [role="tab"] {
width: 50%
}
[role="tablist"][data-items="3"] > [role="tab"] {
width: 33.33%
}
[role="tablist"][data-items="4"] > [role="tab"] {
width: 25%
}
[role="tablist"][data-items="5"] > [role="tab"] {
width: 20%
}
[role="tablist"].bottom > [role="tab"] > a {
margin-top: -4rem;
top: 100%;
}
/* Filters */
[role="tablist"][data-type="filter"] > [role="tab"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* Collision: This should be added to Gaia */
/* Switches and List buttons */
ul.compact li label:not([for]),
ol.compact li label:not([for]) {
height: auto;
width: auto;
}
/* Missing in BB */
section[data-type="sidebar"] > header a,
section[data-type="sidebar"] > header button {
font-weight: normal;
text-decoration: none;
}