Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Commit 12ae28c

Browse files
author
Joshua Smith
committed
Optimize css for mobile device performance (#130)
1 parent 543aff7 commit 12ae28c

5 files changed

Lines changed: 51 additions & 51 deletions

File tree

style/bb/drawer.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ section[data-type="sidebar"] [role="toolbar"] {
215215
left: 0;
216216
width: 80%;
217217
right: auto;
218-
z-index: 101;
219218
}
220219

221220
section[data-type="sidebar"][data-position="right"] [role="toolbar"] {

style/bb/tabs.css

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,33 @@
2222

2323
/* Items calcs */
2424
[role="tablist"][data-items="2"] > [role="tab"] {
25-
width: calc(100% / 2);
2625
width: -moz-calc(100% / 2);
2726
width: -webkit-calc(100% / 2);
27+
width: calc(100% / 2);
2828
}
2929

3030
[role="tablist"][data-items="3"] > [role="tab"] {
31-
width: calc(100% / 3);
3231
width: -moz-calc(100% / 3);
3332
width: -webkit-calc(100% / 3);
33+
width: calc(100% / 3);
3434
}
3535

3636
[role="tablist"][data-items="4"] > [role="tab"] {
37-
width: calc(100% / 3);
3837
width: -moz-calc(100% / 3);
3938
width: -webkit-calc(100% / 3);
39+
width: calc(100% / 3);
4040
}
4141

4242
[role="tablist"][data-items="4.1"] > [role="tab"] {
43-
width: calc(100% / 4.1);
4443
width: -moz-calc(100% / 4.1);
4544
width: -webkit-calc(100% / 4.1);
45+
width: calc(100% / 4.1);
4646
}
4747

4848
[role="tablist"][data-items="5"] > [role="tab"] {
49-
width: calc(100% / 5);
5049
width: -moz-calc(100% / 5);
5150
width: -webkit-calc(100% / 5);
51+
width: calc(100% / 5);
5252
}
5353

5454
[role="tablist"] > [role="tab"] > a {
@@ -61,10 +61,10 @@
6161
background: #C7C7C7;
6262
position: relative;
6363
color: #737373;
64-
transition: all .5s;
6564
-moz-transition: all .5s;
6665
-webkit-transition: all .5s;
6766
-o-transition: all .5s;
67+
transition: all .5s;
6868
font-weight: bold;
6969
}
7070

@@ -94,11 +94,10 @@
9494
/* Hidden */
9595
[role="tablist"] > [role="tab"].hidden {
9696
visibility: hidden;
97-
opacity: 0;
98-
transition: all .5s;
9997
-moz-transition: all .5s;
10098
-webkit-transition: all .5s;
10199
-o-transition: all .5s;
100+
transition: all .5s;
102101
}
103102

104103
/* Selected state */
@@ -126,49 +125,47 @@
126125
left: 0;
127126
visibility: hidden;
128127
width: 100%;
129-
height: calc(100% - 4rem);
130128
height: -moz-calc(100% - 4rem);
131129
height: -webkit-calc(100% - 4rem);
130+
height: calc(100% - 4rem);
132131
display: block;
133132
overflow: auto;
134-
opacity: .4;
135-
transform: translateX(-102%);
136133
-moz-transform: translateX(-102%);
137134
-webkit-transform: translateX(-102%);
138135
-o-transform: translateX(-102%);
139136
-ms-transform: translateX(-102%);
137+
transform: translateX(-102%);
140138
background: #EEE;
141-
transition: all .4s;
142139
-moz-transition: all .4s;
143140
-webkit-transition: all .4s;
144141
-o-transition: all .4s;
142+
transition: all .4s;
145143
}
146144

147145
.current [role="tablist"] .selected [role="tabpanel"], .parent [role="tablist"] .selected [role="tabpanel"], .active [role="tablist"] .selected [role="tabpanel"] {
148146
visibility: visible;
149-
opacity: 1;
150-
transform: none;
151147
-moz-transform: none;
152148
-webkit-transform: none;
153149
-o-transform: none;
154150
-ms-transform: none;
151+
transform: none;
155152
}
156153

157154
[role="tablist"] .selected [role="tabpanel"] {
158155
opacity: 1;
159-
transform: none;
160156
-moz-transform: none;
161157
-webkit-transform: none;
162158
-o-transform: none;
163159
-ms-transform: none;
160+
transform: none;
164161
}
165162

166163
[role="tablist"] .selected ~ [role="tab"] [role="tabpanel"] {
167-
transform: translateX(102%);
168164
-moz-transform: translateX(102%);
169165
-webkit-transform: translateX(102%);
170166
-o-transform: translateX(102%);
171167
-ms-transform: translateX(102%);
168+
transform: translateX(102%);
172169
}
173170

174171
/* Position bottom */
@@ -179,9 +176,9 @@
179176
[role="tablist"].bottom > [role="tab"] > a {
180177
position: relative;
181178
height: 4rem;
182-
top: calc(100% - 4rem);
183179
top: -moz-calc(100% - 4rem);
184180
top: -webkit-calc(100% - 4rem);
181+
top: calc(100% - 4rem);
185182
}
186183

187184
[role="tablist"].bottom [role="tabpanel"] {
@@ -215,9 +212,9 @@
215212
[role="tablist"][data-type="filter"] > [role="tab"] {
216213
float: left;
217214
text-align: center;
218-
box-sizing: border-box;
219215
-moz-box-sizing: border-box;
220216
-webkit-box-sizing: border-box;
217+
box-sizing: border-box;
221218
color: #737272;
222219
border-bottom: solid 1px #999;
223220
}

style/bb/toolbars.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
position: fixed;
99
bottom: 0;
1010
left: 0;
11-
z-index: 100;
1211
background-color: #1d1d1d;
1312
}
1413

style/desktop.css

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
bottom: 20%;
1010
box-shadow: 0 0 20px black;
1111
padding: 5px;
12-
opacity: 0;
13-
transform: translateY(120%);
14-
-webkit-transform: translateY(120%);
12+
-webkit-transform: translateY(150%);
13+
-moz-transform: translateY(150%);
14+
-o-transform: translateY(150%);
15+
-ms-transform: translateY(150%);
16+
transform: translateY(150%);
1517
z-index: 102 !important;
1618
}
1719
section[role="dialog"] + .background, form[role="dialog"] + .background {
@@ -28,17 +30,23 @@
2830
content: "";
2931
opacity: 0;
3032
visibility: hidden;
31-
transition: opacity .4s, visibility .4s 0s;
33+
-moz-transition: opacity .4s, visibility .4s 0s;
3234
-webkit-transition: opacity .4s, visibility .4s 0s;
35+
-o-transition: opacity .4s, visibility .4s 0s;
36+
-ms-transition: opacity .4s, visibility .4s 0s;
37+
transition: opacity .4s, visibility .4s 0s;
3338
}
3439
section[role="dialog"].current + .background,
3540
section[role="dialog"].parent + .background,
3641
form[role="dialog"].current + .background,
3742
form[role="dialog"].parent + .background {
3843
opacity: 1;
3944
visibility: visible;
40-
transition: opacity .4s, visibility 0s;
45+
-moz-transition: opacity .4s, visibility 0s;
4146
-webkit-transition: opacity .4s, visibility 0s;
47+
-o-transition: opacity .4s, visibility 0s;
48+
-ms-transition: opacity .4s, visibility 0s;
49+
transition: opacity .4s, visibility 0s;
4250
}
4351
[role="main"].header-only {
4452
overflow: auto;
@@ -73,6 +81,10 @@
7381
-o-transform: translateX(-250px) !important;
7482
-ms-transform: translateX(-250px) !important;
7583
transform: translateX(-250px) !important;
76-
}
84+
}
7785

86+
/* Misc */
87+
.firetext {
88+
text-align: left !important;
89+
}
7890
}

style/regions.css

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,48 @@ section[role="region"], section[role="dialog"] {
1313
left: 0px;
1414
right: 0px;
1515
background-color: #eee;
16-
transition: all .4s ease;
1716
-moz-transition: all .4s ease;
1817
-webkit-transition: all .4s ease;
1918
-o-transition: all .4s ease;
19+
transition: all .4s ease;
2020
}
2121

2222
section[role="region"] {
2323
visibility: hidden;
24-
opacity: .99;
25-
transform: translateX(-100%);
2624
-moz-transform: translateX(-100%);
2725
-webkit-transform: translateX(-100%);
2826
-o-transform: translateX(-100%);
2927
-ms-transform: translateX(-100%);
28+
transform: translateX(-100%);
3029
}
3130

3231
section[role="region"].current,
3332
[role="region"].parent,
3433
[role="dialog"].parent {
3534
visibility: visible;
36-
opacity: 1;
37-
z-index: 100;
38-
transform: none;
35+
z-index: 100;
3936
-moz-transform: none;
4037
-webkit-transform: none;
4138
-o-transform: none;
42-
-ms-transform: none;
39+
-ms-transform: none;
40+
transform: none;
4341
}
4442

4543
section[role="region"].current ~ section[role="region"] {
46-
opacity: .99;
47-
transform: translateX(100%);
4844
-moz-transform: translateX(100%);
4945
-webkit-transform: translateX(100%);
5046
-o-transform: translateX(100%);
5147
-ms-transform: translateX(100%);
48+
transform: translateX(100%);
5249
}
5350

5451
section[role="dialog"] {
5552
visibility: hidden;
56-
opacity: .99;
57-
transform: translateY(100%);
5853
-moz-transform: translateY(100%);
5954
-webkit-transform: translateY(100%);
6055
-o-transform: translateY(100%);
6156
-ms-transform: translateY(100%);
57+
transform: translateY(100%);
6258
}
6359

6460
section[role="dialog"] + .background {
@@ -68,45 +64,42 @@ section[role="dialog"] + .background {
6864
section[role="dialog"].current {
6965
z-index: 101;
7066
visibility: visible;
71-
opacity: 1;
72-
transform: none;
7367
-moz-transform: none;
7468
-webkit-transform: none;
7569
-o-transform: none;
7670
-ms-transform: none;
71+
transform: none;
7772
}
7873

7974
/* Handle sidebars */
8075
[data-type="sidebar"] {
81-
opacity: 0;
8276
visibility: collapse;
83-
transition: opacity .4s, .4s visibility 0s;
84-
-moz-transition: opacity .4s, .4s visibility 0s;
85-
-webkit-transition: opacity .4s, .4s visibility 0s;
86-
-o-transition: opacity .4s, .4s visibility 0s;
77+
-moz-transition: .4s visibility 0s;
78+
-webkit-transition: .4s visibility 0s;
79+
-o-transition: 4s visibility 0s;
80+
transition: .4s visibility 0s;
8781
}
8882

8983
[data-type="sidebar"].active {
90-
opacity: 1;
9184
visibility: visible;
92-
transition: opacity .4s, 0s visibility 0s;
93-
-moz-transition: opacity .4s, 0s visibility 0s;
94-
-webkit-transition: opacity .4s, 0s visibility 0s;
95-
-o-transition: opacity .4s, 0s visibility 0s;
85+
-moz-transition: 0s visibility 0s;
86+
-webkit-transition: 0s visibility 0s;
87+
-o-transition: 0s visibility 0s;
88+
transition: 0s visibility 0s;
9689
}
9790

9891
[data-state="drawer"].current {
99-
transform: translateX(80%) !important;
10092
-moz-transform: translateX(80%) !important;
10193
-webkit-transform: translateX(80%) !important;
10294
-o-transform: translateX(80%) !important;
10395
-ms-transform: translateX(80%) !important;
96+
transform: translateX(80%) !important;
10497
}
10598

10699
[data-state="drawer"][data-position="right"].current {
107-
transform: translateX(-80%) !important;
108100
-moz-transform: translateX(-80%) !important;
109101
-webkit-transform: translateX(-80%) !important;
110102
-o-transform: translateX(-80%) !important;
111103
-ms-transform: translateX(-80%) !important;
104+
transform: translateX(-80%) !important;
112105
}

0 commit comments

Comments
 (0)