CSS optimization.
Ylian Saint-Hilaire committed
May 25, 2023 at 10:33 UTC
e4d8c04afe290c6daf705dfd1907122d126a710a
2 files changed
+13
-44
public/styles/style.css
+7
-38
@@ -1533,9 +1533,8 @@ a {
1533
opacity: 1;
1534
}
1535
1536
-.lb1 {
1537
- background: url(../images/leftbar-64.png) -1px -2px;
1538
- background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1536
+/*groups all buttons repeated code into one block*/
1537
+.lbtg {
1538
height: 62px;
1539
width: 62px;
1540
cursor: pointer;
@@ -1545,64 +1544,34 @@ a {
1544
left: 6px;
1545
}
1546
1547
+.lb1 {
1548
+ background: url(../images/leftbar-64.png) -1px -2px;
1549
+ background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1550
+}
1551
+
1552
.lb2 {
1553
background: url(../images/leftbar-64.png) -66px -2px;
1554
background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1551
- height: 62px;
1552
- width: 62px;
1553
- cursor: pointer;
1554
- border: none;
1555
- position: absolute;
1556
- top: 6px;
1557
- left: 6px;
1555
}
1556
1557
.lb3 {
1558
background: url(../images/leftbar-64.png) -130px -2px;
1559
background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1563
- height: 62px;
1564
- width: 62px;
1565
- cursor: pointer;
1566
- border: none;
1567
- position: absolute;
1568
- top: 6px;
1569
- left: 6px;
1560
}
1561
1562
.lb4 {
1563
background: url(../images/leftbar-64.png) -194px -2px;
1564
background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1575
- height: 62px;
1576
- width: 62px;
1577
- cursor: pointer;
1578
- border: none;
1579
- position: absolute;
1580
- top: 6px;
1581
- left: 6px;
1565
}
1566
1567
.lb5 {
1568
background: url(../images/leftbar-64.png) -257px -2px;
1569
background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1587
- height: 62px;
1588
- width: 62px;
1589
- cursor: pointer;
1590
- border: none;
1591
- position: absolute;
1592
- top: 6px;
1593
- left: 6px;
1570
}
1571
1572
.lb6 {
1573
background: url(../images/leftbar-64.png) -318px -2px;
1574
background-image: image-set(url(../images/leftbar-64.png) 1x, url(../images/leftbar-128.png) 2x);
1599
- height: 62px;
1600
- width: 62px;
1601
- cursor: pointer;
1602
- border: none;
1603
- position: absolute;
1604
- top: 6px;
1605
- left: 6px;
1575
}
1576
1577
.m0 {
views/default.handlebars
+6
-6
@@ -162,22 +162,22 @@
162
<div id="page_leftbar">
163
<div style="height:16px"></div>
164
<div id=LeftMenuMyDevices tabindex=0 class="lbbutton lbbuttonsel" title="My Devices" onclick=go(1,event) onkeypress="if (event.key=='Enter') { go(1); }">
165
- <div class="lb2"></div>
165
+ <div class="lbtg lb2"></div>
166
</div>
167
<div id=LeftMenuMyAccount tabindex=0 class="lbbutton" title="My Account" onclick=go(2,event) onkeypress="if (event.key=='Enter') { go(2); }">
168
- <div class="lb1"></div>
168
+ <div class="lbtg lb1"></div>
169
</div>
170
<div id=LeftMenuMyEvents tabindex=0 class="lbbutton" title="My Events" onclick=go(3,event) onkeypress="if (event.key=='Enter') { go(3); }">
171
- <div class="lb3"></div>
171
+ <div class="lbtg lb3"></div>
172
</div>
173
<div id=LeftMenuMyFiles tabindex=0 class="lbbutton" style="display:none" title="My Files" onclick=go(5,event) onkeypress="if (event.key=='Enter') { go(5); }">
174
- <div class="lb4"></div>
174
+ <div class="lbtg lb4"></div>
175
</div>
176
<div id=LeftMenuMyUsers tabindex=0 class="lbbutton" style="display:none" title="My Users" onclick=go(4,event) onkeypress="if (event.key=='Enter') { go(4); }">
177
- <div class="lb5"></div>
177
+ <div class="lbtg lb5"></div>
178
</div>
179
<div id=LeftMenuMyServer tabindex=0 class="lbbutton" style="display:none" title="My Server" onclick=go(6,event) onkeypress="if (event.key=='Enter') { go(6); }">
180
- <div class="lb6"></div>
180
+ <div class="lbtg lb6"></div>
181
</div>
182
</div>
183
<div id=topbar class=noselect>