2014-01-03 00:54:50 +01:00
|
|
|
// 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
|
2014-01-06 12:21:55 +01:00
|
|
|
// Find out more here: https://github.com/IanLunn/Hover/wiki/Hacks-Explained
|
|
|
|
|
2014-01-03 00:54:50 +01:00
|
|
|
@mixin hardwareAccel() {
|
2015-01-06 16:14:46 +01:00
|
|
|
// Improve performance on mobile/tablet devices
|
2016-10-21 15:49:57 +02:00
|
|
|
// Perspective reduces blurryness of text in Chrome
|
|
|
|
@include prefixed(transform, perspective(1px) translateZ(0));
|
2014-01-03 00:54:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin improveAntiAlias() {
|
2015-01-06 16:14:46 +01:00
|
|
|
// Improve aliasing on mobile/tablet devices
|
2015-01-05 17:31:51 +01:00
|
|
|
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
|
2014-01-03 00:54:50 +01:00
|
|
|
}
|
|
|
|
|
2015-01-06 16:14:46 +01:00
|
|
|
@mixin forceBlockLevel() {
|
|
|
|
// Transforms need to be block-level to work
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
2014-01-08 19:26:05 +01:00
|
|
|
@mixin hacks() {
|
2015-01-06 16:14:46 +01:00
|
|
|
@include forceBlockLevel();
|
2014-10-08 16:43:06 +02:00
|
|
|
@include hardwareAccel();
|
|
|
|
@include improveAntiAlias();
|
2014-04-05 11:23:15 +02:00
|
|
|
}
|