forked from IanLunn/Hover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_hacks.less
32 lines (27 loc) · 810 Bytes
/
_hacks.less
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
// As is often the case, some devices/browsers need additional code to get CSS to work
// in the most desired way. These mixins are used to quickly drop in hacks for each element
// Find out more here: https://github.com/IanLunn/Hover/wiki/Hacks-Explained
.hardwareAccel() {
// Improve performance on mobile/tablet devices
.prefixed(transform, translateZ(0));
}
.improveAntiAlias() {
// Improve aliasing on mobile/tablet devices
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
}
.fontSmooth() {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
}
.forceBlockLevel() {
// Transforms need to be block-level to work
display: inline-block;
vertical-align: middle;
}
.hacks() {
.forceBlockLevel();
.hardwareAccel();
.improveAntiAlias();
.fontSmooth();
}