What are standard breakpoints for @media queries in CSS? [closed]












0















So I'm sifting through many different @media queries for all of the different commonly used devices of today however I find that if I try and cater for everyone in this way I'll end up with half my code being @media queries.



Are there any standardized @media queries that will allow me to cater for the masses in three @media queries? One for Mobiles, One for Tablet, One for Desktops/Laptops?



@media only screen /* iPhone 6, 6S, 7 and 8 */
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media only screen /* iPhone 6+, 7+ and 8+ */
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3) {

}

@media only screen /* iPad 3, 4 and Pro 9.7 */
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media screen /* Non-Retina Desktop/Laptop */
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1) {

}









share|improve this question















closed as primarily opinion-based by Temani Afif, Paulie_D, zzzzBov, Roman Pokrovskij, david Jan 2 at 4:41


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Dec 29 '18 at 13:42











  • I basically only have one breakpoint which is min-width: 768px. Anything under (default) I consider as small device, anything over is Tablet, Laptop or Desktop. I also started out with the ambition to customize for all screen sizes, but I found out it wasn't really necessary and just caused issues.

    – TheRuler
    Dec 29 '18 at 14:15













  • A very broad and subjective topic, not really suited for StackOverflow.

    – MarsAndBack
    Dec 29 '18 at 16:14











  • Your mindset should be about targeting a few avg width's to cover 90% of devices. A popular page-builder for WordPress simply uses the following breakpoints: 360px, 768px, 1024px and this has served me very well. At this early stage you shouldn't think about targeting specific devices; only when there's explicit reason to do so e.g. you have a website selling a new iPhone related accessory... now is a good time to invoke iPhone-specific styling because you want a perfected presentation for that target audience.

    – MarsAndBack
    Dec 29 '18 at 16:19
















0















So I'm sifting through many different @media queries for all of the different commonly used devices of today however I find that if I try and cater for everyone in this way I'll end up with half my code being @media queries.



Are there any standardized @media queries that will allow me to cater for the masses in three @media queries? One for Mobiles, One for Tablet, One for Desktops/Laptops?



@media only screen /* iPhone 6, 6S, 7 and 8 */
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media only screen /* iPhone 6+, 7+ and 8+ */
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3) {

}

@media only screen /* iPad 3, 4 and Pro 9.7 */
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media screen /* Non-Retina Desktop/Laptop */
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1) {

}









share|improve this question















closed as primarily opinion-based by Temani Afif, Paulie_D, zzzzBov, Roman Pokrovskij, david Jan 2 at 4:41


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Dec 29 '18 at 13:42











  • I basically only have one breakpoint which is min-width: 768px. Anything under (default) I consider as small device, anything over is Tablet, Laptop or Desktop. I also started out with the ambition to customize for all screen sizes, but I found out it wasn't really necessary and just caused issues.

    – TheRuler
    Dec 29 '18 at 14:15













  • A very broad and subjective topic, not really suited for StackOverflow.

    – MarsAndBack
    Dec 29 '18 at 16:14











  • Your mindset should be about targeting a few avg width's to cover 90% of devices. A popular page-builder for WordPress simply uses the following breakpoints: 360px, 768px, 1024px and this has served me very well. At this early stage you shouldn't think about targeting specific devices; only when there's explicit reason to do so e.g. you have a website selling a new iPhone related accessory... now is a good time to invoke iPhone-specific styling because you want a perfected presentation for that target audience.

    – MarsAndBack
    Dec 29 '18 at 16:19














0












0








0








So I'm sifting through many different @media queries for all of the different commonly used devices of today however I find that if I try and cater for everyone in this way I'll end up with half my code being @media queries.



Are there any standardized @media queries that will allow me to cater for the masses in three @media queries? One for Mobiles, One for Tablet, One for Desktops/Laptops?



@media only screen /* iPhone 6, 6S, 7 and 8 */
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media only screen /* iPhone 6+, 7+ and 8+ */
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3) {

}

@media only screen /* iPad 3, 4 and Pro 9.7 */
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media screen /* Non-Retina Desktop/Laptop */
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1) {

}









share|improve this question
















So I'm sifting through many different @media queries for all of the different commonly used devices of today however I find that if I try and cater for everyone in this way I'll end up with half my code being @media queries.



Are there any standardized @media queries that will allow me to cater for the masses in three @media queries? One for Mobiles, One for Tablet, One for Desktops/Laptops?



@media only screen /* iPhone 6, 6S, 7 and 8 */
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media only screen /* iPhone 6+, 7+ and 8+ */
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3) {

}

@media only screen /* iPad 3, 4 and Pro 9.7 */
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 2) {

}

@media screen /* Non-Retina Desktop/Laptop */
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1) {

}






html css media-queries media






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 30 '18 at 11:59









kev

654112




654112










asked Dec 29 '18 at 13:21









MaximilianMaximilian

486




486




closed as primarily opinion-based by Temani Afif, Paulie_D, zzzzBov, Roman Pokrovskij, david Jan 2 at 4:41


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as primarily opinion-based by Temani Afif, Paulie_D, zzzzBov, Roman Pokrovskij, david Jan 2 at 4:41


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Dec 29 '18 at 13:42











  • I basically only have one breakpoint which is min-width: 768px. Anything under (default) I consider as small device, anything over is Tablet, Laptop or Desktop. I also started out with the ambition to customize for all screen sizes, but I found out it wasn't really necessary and just caused issues.

    – TheRuler
    Dec 29 '18 at 14:15













  • A very broad and subjective topic, not really suited for StackOverflow.

    – MarsAndBack
    Dec 29 '18 at 16:14











  • Your mindset should be about targeting a few avg width's to cover 90% of devices. A popular page-builder for WordPress simply uses the following breakpoints: 360px, 768px, 1024px and this has served me very well. At this early stage you shouldn't think about targeting specific devices; only when there's explicit reason to do so e.g. you have a website selling a new iPhone related accessory... now is a good time to invoke iPhone-specific styling because you want a perfected presentation for that target audience.

    – MarsAndBack
    Dec 29 '18 at 16:19














  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Dec 29 '18 at 13:42











  • I basically only have one breakpoint which is min-width: 768px. Anything under (default) I consider as small device, anything over is Tablet, Laptop or Desktop. I also started out with the ambition to customize for all screen sizes, but I found out it wasn't really necessary and just caused issues.

    – TheRuler
    Dec 29 '18 at 14:15













  • A very broad and subjective topic, not really suited for StackOverflow.

    – MarsAndBack
    Dec 29 '18 at 16:14











  • Your mindset should be about targeting a few avg width's to cover 90% of devices. A popular page-builder for WordPress simply uses the following breakpoints: 360px, 768px, 1024px and this has served me very well. At this early stage you shouldn't think about targeting specific devices; only when there's explicit reason to do so e.g. you have a website selling a new iPhone related accessory... now is a good time to invoke iPhone-specific styling because you want a perfected presentation for that target audience.

    – MarsAndBack
    Dec 29 '18 at 16:19








1




1





Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details.

– Paulie_D
Dec 29 '18 at 13:42





Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details.

– Paulie_D
Dec 29 '18 at 13:42













I basically only have one breakpoint which is min-width: 768px. Anything under (default) I consider as small device, anything over is Tablet, Laptop or Desktop. I also started out with the ambition to customize for all screen sizes, but I found out it wasn't really necessary and just caused issues.

– TheRuler
Dec 29 '18 at 14:15







I basically only have one breakpoint which is min-width: 768px. Anything under (default) I consider as small device, anything over is Tablet, Laptop or Desktop. I also started out with the ambition to customize for all screen sizes, but I found out it wasn't really necessary and just caused issues.

– TheRuler
Dec 29 '18 at 14:15















A very broad and subjective topic, not really suited for StackOverflow.

– MarsAndBack
Dec 29 '18 at 16:14





A very broad and subjective topic, not really suited for StackOverflow.

– MarsAndBack
Dec 29 '18 at 16:14













Your mindset should be about targeting a few avg width's to cover 90% of devices. A popular page-builder for WordPress simply uses the following breakpoints: 360px, 768px, 1024px and this has served me very well. At this early stage you shouldn't think about targeting specific devices; only when there's explicit reason to do so e.g. you have a website selling a new iPhone related accessory... now is a good time to invoke iPhone-specific styling because you want a perfected presentation for that target audience.

– MarsAndBack
Dec 29 '18 at 16:19





Your mindset should be about targeting a few avg width's to cover 90% of devices. A popular page-builder for WordPress simply uses the following breakpoints: 360px, 768px, 1024px and this has served me very well. At this early stage you shouldn't think about targeting specific devices; only when there's explicit reason to do so e.g. you have a website selling a new iPhone related accessory... now is a good time to invoke iPhone-specific styling because you want a perfected presentation for that target audience.

– MarsAndBack
Dec 29 '18 at 16:19












1 Answer
1






active

oldest

votes


















1














While this can get opinionated, I define my breakpoints per website design and not based on some fixed widths for specific devices.



Here's my basic workflow:




  1. Create the website layout for either desktop or mobile first.

  2. Start to increase or decrease your width depending on your first design and find key points where your design breaks and looks bad.

  3. Group these points into common breakpoints to decrease the overall number of breakpoints (e.g. if something breaks at 850 and another think at 900 I look if I could change them at the same breakpoint.

  4. Avoid going for minor things that don't change the overall picture. They can be amended later. This is something that comes with experience because it's hard to know beforehand whether something is minor or will have profound effects on the overall layout. So it doesn't matter if you don't consider this point in your first projects.


When working desktop-first, I don't design for huge desktops and just incorporate them later when I create my breakpoints, but that's a preference.



BTW, don't use pixel units in your media queries, or anywhere else for that matter, except for very small numbers like border-radius. This can save you a lot of future headache and redundant work.






share|improve this answer


























  • What units do you suggest I use in this case?

    – Maximilian
    Dec 29 '18 at 14:36











  • @Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

    – kev
    Dec 29 '18 at 18:19






  • 1





    This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

    – Adam
    Dec 29 '18 at 20:09











  • @Adam, yeah, "Based on design, not on device"! I like that!

    – kev
    Dec 30 '18 at 7:52


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














While this can get opinionated, I define my breakpoints per website design and not based on some fixed widths for specific devices.



Here's my basic workflow:




  1. Create the website layout for either desktop or mobile first.

  2. Start to increase or decrease your width depending on your first design and find key points where your design breaks and looks bad.

  3. Group these points into common breakpoints to decrease the overall number of breakpoints (e.g. if something breaks at 850 and another think at 900 I look if I could change them at the same breakpoint.

  4. Avoid going for minor things that don't change the overall picture. They can be amended later. This is something that comes with experience because it's hard to know beforehand whether something is minor or will have profound effects on the overall layout. So it doesn't matter if you don't consider this point in your first projects.


When working desktop-first, I don't design for huge desktops and just incorporate them later when I create my breakpoints, but that's a preference.



BTW, don't use pixel units in your media queries, or anywhere else for that matter, except for very small numbers like border-radius. This can save you a lot of future headache and redundant work.






share|improve this answer


























  • What units do you suggest I use in this case?

    – Maximilian
    Dec 29 '18 at 14:36











  • @Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

    – kev
    Dec 29 '18 at 18:19






  • 1





    This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

    – Adam
    Dec 29 '18 at 20:09











  • @Adam, yeah, "Based on design, not on device"! I like that!

    – kev
    Dec 30 '18 at 7:52
















1














While this can get opinionated, I define my breakpoints per website design and not based on some fixed widths for specific devices.



Here's my basic workflow:




  1. Create the website layout for either desktop or mobile first.

  2. Start to increase or decrease your width depending on your first design and find key points where your design breaks and looks bad.

  3. Group these points into common breakpoints to decrease the overall number of breakpoints (e.g. if something breaks at 850 and another think at 900 I look if I could change them at the same breakpoint.

  4. Avoid going for minor things that don't change the overall picture. They can be amended later. This is something that comes with experience because it's hard to know beforehand whether something is minor or will have profound effects on the overall layout. So it doesn't matter if you don't consider this point in your first projects.


When working desktop-first, I don't design for huge desktops and just incorporate them later when I create my breakpoints, but that's a preference.



BTW, don't use pixel units in your media queries, or anywhere else for that matter, except for very small numbers like border-radius. This can save you a lot of future headache and redundant work.






share|improve this answer


























  • What units do you suggest I use in this case?

    – Maximilian
    Dec 29 '18 at 14:36











  • @Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

    – kev
    Dec 29 '18 at 18:19






  • 1





    This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

    – Adam
    Dec 29 '18 at 20:09











  • @Adam, yeah, "Based on design, not on device"! I like that!

    – kev
    Dec 30 '18 at 7:52














1












1








1







While this can get opinionated, I define my breakpoints per website design and not based on some fixed widths for specific devices.



Here's my basic workflow:




  1. Create the website layout for either desktop or mobile first.

  2. Start to increase or decrease your width depending on your first design and find key points where your design breaks and looks bad.

  3. Group these points into common breakpoints to decrease the overall number of breakpoints (e.g. if something breaks at 850 and another think at 900 I look if I could change them at the same breakpoint.

  4. Avoid going for minor things that don't change the overall picture. They can be amended later. This is something that comes with experience because it's hard to know beforehand whether something is minor or will have profound effects on the overall layout. So it doesn't matter if you don't consider this point in your first projects.


When working desktop-first, I don't design for huge desktops and just incorporate them later when I create my breakpoints, but that's a preference.



BTW, don't use pixel units in your media queries, or anywhere else for that matter, except for very small numbers like border-radius. This can save you a lot of future headache and redundant work.






share|improve this answer















While this can get opinionated, I define my breakpoints per website design and not based on some fixed widths for specific devices.



Here's my basic workflow:




  1. Create the website layout for either desktop or mobile first.

  2. Start to increase or decrease your width depending on your first design and find key points where your design breaks and looks bad.

  3. Group these points into common breakpoints to decrease the overall number of breakpoints (e.g. if something breaks at 850 and another think at 900 I look if I could change them at the same breakpoint.

  4. Avoid going for minor things that don't change the overall picture. They can be amended later. This is something that comes with experience because it's hard to know beforehand whether something is minor or will have profound effects on the overall layout. So it doesn't matter if you don't consider this point in your first projects.


When working desktop-first, I don't design for huge desktops and just incorporate them later when I create my breakpoints, but that's a preference.



BTW, don't use pixel units in your media queries, or anywhere else for that matter, except for very small numbers like border-radius. This can save you a lot of future headache and redundant work.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 29 '18 at 13:52

























answered Dec 29 '18 at 13:47









kevkev

654112




654112













  • What units do you suggest I use in this case?

    – Maximilian
    Dec 29 '18 at 14:36











  • @Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

    – kev
    Dec 29 '18 at 18:19






  • 1





    This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

    – Adam
    Dec 29 '18 at 20:09











  • @Adam, yeah, "Based on design, not on device"! I like that!

    – kev
    Dec 30 '18 at 7:52



















  • What units do you suggest I use in this case?

    – Maximilian
    Dec 29 '18 at 14:36











  • @Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

    – kev
    Dec 29 '18 at 18:19






  • 1





    This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

    – Adam
    Dec 29 '18 at 20:09











  • @Adam, yeah, "Based on design, not on device"! I like that!

    – kev
    Dec 30 '18 at 7:52

















What units do you suggest I use in this case?

– Maximilian
Dec 29 '18 at 14:36





What units do you suggest I use in this case?

– Maximilian
Dec 29 '18 at 14:36













@Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

– kev
Dec 29 '18 at 18:19





@Maximilian, personally I use rem (for media queries, fonts etc. except for special cases like grids where fr is sometimes preferred or vh and vw in other special cases) and they've never failed me, but there is some debate over rem vs em and I can't give you authoritative answer on that last part. rem just needs some setup at the beginning and then it is very robust and reliable.

– kev
Dec 29 '18 at 18:19




1




1





This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

– Adam
Dec 29 '18 at 20:09





This is also the way I do it. Good point that it can get opinionated, different people deal with it in different ways. When a layout breaks, add a breakpoint. Different layouts break at difference places, which is why every layout needs (in my opinion) a different set of breakpoints. Certain layouts might not even need any, others might need a lot. Breakpoints should be based on design, not on device.

– Adam
Dec 29 '18 at 20:09













@Adam, yeah, "Based on design, not on device"! I like that!

– kev
Dec 30 '18 at 7:52





@Adam, yeah, "Based on design, not on device"! I like that!

– kev
Dec 30 '18 at 7:52



Popular posts from this blog

Mossoró

Monofisismo

Cannot access a disposed object : DataContext