Last active
December 18, 2018 06:57
-
-
Save LeezQ/639728831bd4a215e735683b55c7f74b to your computer and use it in GitHub Desktop.
1px
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.documentElement.classList.add('hairlines'); | |
} | |
document.body.removeChild(testElem); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html.hairlines a, html.hairlines div, html.hairlines dl, html.hairlines header, html.hairlines ul, html.hairlines li { | |
border-width: .5px!important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment