Instantly share code, notes, and snippets.

View style-hairline.css
div {
border: 1px solid #bbb;
}
.hairlines div {
border-width: 0.5px;
}
View hairlines.js
if (window.devicePixelRatio && devicePixelRatio >= 2) {
var testElem = document.createElement('div');
testElem.style.border = '.5px solid transparent';
document.body.appendChild(testElem);
if (testElem.offsetHeight == 1)
{
document.querySelector('html').classList.add('hairlines');
}
document.body.removeChild(testElem);
}
View hairlines.css
div {
border: 1px solid #bbb;
}
.hairlines div {
border-width: 0.5px;
}
View gist:9793605
@media only screen and (max-device-width: 768px) and (min-device-width: 321px) {
.carplay .app .landscape-container {
-webkit-perspective-origin: 100% 0.05405%;
-webkit-perspective: 10px;
}
.carplay .app .landscape {
-webkit-transform: translate3d(0, 0, -100px) scale(11);
-webkit-transform-origin: 100% 100%;
position: -webkit-sticky;
top: 158%;
View ac-base.js
var AC = window.AC || {};
AC.namespace = function (a) {
var c;
if (!(a && a.match && a.match(/\S/))) {
throw "Attempt to create AC.namespace with no name."
}
var d = a.split(/\./);
var b = window;
for (c = 0; c < d.length; c++) {
b[d[c]] = b[d[c]] || {};
View gist:9134079
InstantClick.on('click', function() {
NProgress.start();
})
InstantClick.on('change', function() {
NProgress.done()
});
InstantClick.init();