What is the right method to use CSS media queries?
Should I specify a breakpoint for each device size or write the queries according to when my website's shape starts to get bad? What is the convention?
For example: With the first choice, I will get the sizes from a website like w3schoolsThen specify a media query for each of these devices:
/* Extra small devices (phones, 600px and down) */ @media only screen and (max-width: 600px) {...} /* Small devices (portrait tablets and large phones, 600px and up) */ @media only screen and (min-width: 600px) {...} /* Medium devices (landscape tablets, 768px and up) */ @media only screen and (min-width: 768px) {...} /* Large devices (laptops/desktops, 992px and up) */ @media only screen and (min-width: 992px) {...} /* Extra large devices (large laptops and desktops, 1200px and up) */ @media only screen and (min-width: 1200px) {...}
But with the second option, I will only write a new CSS media query when the website's shape breaks. Example:
@media only screen and (min-width: 764px) {...}
@media only screen and (min-width: 1092px) {...}
@media only screen and (min-width: 1243px) {...}