Created
May 19, 2020 14:36
-
-
Save daniil4udo/62acc53bbbcfea20dd21b1c984665b38 to your computer and use it in GitHub Desktop.
Completely responsive CSS values, more than just media queries
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
/* | |
Example | |
https://habr.com/ru/post/500014/ | |
*/ | |
/* Mobile and Tablet */ | |
@media (max-width: 768px) { | |
html { | |
font-size: calc(16px + 2 * ((100vw - 360px) / 768)); | |
} | |
} | |
/* Laptop and Desktops screens */ | |
@media (min-width: 769px) and (max-width: 2048px) { | |
html { | |
font-size: calc(14px + 10 * ((100vw - 769px) / 2048)); | |
} | |
} | |
/* Excessively large screens */ | |
html { | |
font-size: 36px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment