Skip to content

Instantly share code, notes, and snippets.

View dieulot's full-sized avatar

Alexandre Dieulot dieulot

View GitHub Profile
InstantClick.on('click', function() {
NProgress.start();
})
InstantClick.on('change', function() {
NProgress.done()
});
InstantClick.init();
@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%;
@dieulot
dieulot / hairlines.css
Created September 15, 2014 10:00
CSS retina hairline, the easy way http://dieulot.net/css-retina-hairline
div {
border: 1px solid #bbb;
}
.hairlines div {
border-width: 0.5px;
}
@dieulot
dieulot / ac-base.js
Last active April 24, 2018 10:41
Apple’s parallax scripts on CarPlay’s page
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]] || {};
@dieulot
dieulot / hairlines.js
Last active June 30, 2020 04:36
http://dieulot.net/css-retina-hairline – CSS retina hairline, the easy way – 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);
}
@dieulot
dieulot / style-hairline.css
Created September 15, 2014 10:06
http://dieulot.net/css-retina-hairline – CSS retina hairline, the easy way – CSS
div {
border: 1px solid #bbb;
}
.hairlines div {
border-width: 0.5px;
}