Last active
March 1, 2019 10:35
-
-
Save kruzyk/6959c824d162b5c59086e8a280aabc5f to your computer and use it in GitHub Desktop.
Detect device with CSS
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
/* smartphones, touchscreens */ | |
@media (hover: none) and (pointer: coarse) { | |
/* ... */ | |
} | |
/* stylus-based screens */ | |
@media (hover: none) and (pointer: fine) { | |
/* ... */ | |
} | |
/* Nintendo Wii controller, Microsoft Kinect */ | |
@media (hover: hover) and (pointer: coarse) { | |
/* ... */ | |
} | |
/* mouse, touch pad */ | |
@media (hover: hover) and (pointer: fine) { | |
/* ... */ | |
} | |
/*================================================== | |
= Bootstrap 3 Media Queries = | |
==================================================*/ | |
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} | |
/* Extra Small Devices, Phones */ | |
@media only screen and (min-width : 480px) { | |
} | |
/* Small Devices, Tablets */ | |
@media only screen and (min-width : 768px) { | |
} | |
/* Medium Devices, Desktops */ | |
@media only screen and (min-width : 992px) { | |
} | |
/* Large Devices, Wide Screens */ | |
@media only screen and (min-width : 1200px) { | |
} | |
/*========== Non-Mobile First Method ==========*/ | |
/* Large Devices, Wide Screens */ | |
@media only screen and (max-width : 1200px) { | |
} | |
/* Medium Devices, Desktops */ | |
@media only screen and (max-width : 992px) { | |
} | |
/* Small Devices, Tablets */ | |
@media only screen and (max-width : 768px) { | |
} | |
/* Extra Small Devices, Phones */ | |
@media only screen and (max-width : 480px) { | |
} | |
/* Custom, iPhone Retina */ | |
@media only screen and (max-width : 320px) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment