Last active
January 11, 2019 19:28
-
-
Save weirdpattern/ce5644266832541e7e1368be706a9eb8 to your computer and use it in GitHub Desktop.
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
2019.01.11.pointer-accuracy-with-media-features |
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> | |
<head> | |
<style> | |
.container { | |
margin-top: 0px; | |
} | |
.container > span { | |
display: block; | |
} | |
@media (pointer: fine) { | |
.container > span:after { | |
content: "A high accuracy device has been detected."; | |
} | |
} | |
@media (pointer: coarse) { | |
input[type="checkbox"], | |
input[type="radio"] { | |
min-width:30px; | |
min-height:40px; | |
background:transparent; | |
} | |
.container > span { | |
font-size: 16px; | |
} | |
.container > span:after { | |
content: "A limited accuracy device has been detected." | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<span></span> | |
<input type="checkbox"> | |
<input type="radio"> | |
</div> | |
</body> | |
</html> |
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
@media ([pointer|any-pointer]: <[none|coarse|fine]>) { | |
[styles] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment