Comments on: A Complete Guide to CSS Media Queries https://css-tricks.com/a-complete-guide-to-css-media-queries/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Wed, 01 May 2024 17:35:07 +0000 hourly 1 https://wordpress.org/?v=6.5.5 By: Benny https://css-tricks.com/a-complete-guide-to-css-media-queries/#comment-1797768 Fri, 18 Nov 2022 14:09:56 +0000 https://css-tricks.com/?p=319964#comment-1797768 Thanks I was actually thinking the Media query was starting to not matter..since in web development the ideal is to always follow the next big trend..

]]>
By: Tzoor Rozental https://css-tricks.com/a-complete-guide-to-css-media-queries/#comment-1773953 Mon, 14 Jun 2021 08:24:55 +0000 https://css-tricks.com/?p=319964#comment-1773953 you can add a link to https://caniuse.com/mdn-css_at-rules_media_range_syntax to the end of the section https://css-tricks.com/a-complete-guide-to-css-media-queries/#using-min-and-max-to-match-value-ranges

]]>
By: havajsky https://css-tricks.com/a-complete-guide-to-css-media-queries/#comment-1771880 Tue, 11 May 2021 02:39:17 +0000 https://css-tricks.com/?p=319964#comment-1771880 The subtitle
“@media screen (min-width: 320px) and (max-width: 768px)”
in “Anatomy of a Media Query” is misleading.
According to the syntax at MDN there should be an “and” after “screen” so you may want to correct it to: “@media screen and (min-width: 320px) and (max-width: 768px)”.

]]>
By: Onaolapo Olufowokan https://css-tricks.com/a-complete-guide-to-css-media-queries/#comment-1765349 Tue, 24 Nov 2020 13:20:02 +0000 https://css-tricks.com/?p=319964#comment-1765349 Thanks for this!

]]>
By: Lucy Kuijk https://css-tricks.com/a-complete-guide-to-css-media-queries/#comment-1763692 Tue, 06 Oct 2020 07:31:35 +0000 https://css-tricks.com/?p=319964#comment-1763692 Thank you for your excellent explanation. On implementing I encountered a missing ‘.matches’ after ‘if ( mediaQuery’ in your Javascript example:
// Check if the media query is true
if ( mediaQuery ) {
// Then log the following message to the console
console.log(‘Media Query Matched!’)
}

This comment-editor does not allow me to format my comment as I would like.
This worked for me:
// Check if the media query is true
if ( mediaQuery.matches ) {
// Then log the following message to the console
console.log(‘Media Query Matched!’)
}

if (mediaQuery.matches)

]]>
By: Arul https://css-tricks.com/a-complete-guide-to-css-media-queries/#comment-1763579 Sat, 03 Oct 2020 08:56:18 +0000 https://css-tricks.com/?p=319964#comment-1763579 I recently learnt that add Listener is deprecated, and we should instead use addeventListener.

]]>