xairbusdriver (1) [Avatar] Offline
p. 42: "These two media queries near the top of your stylesheet can eliminate the need for dozens of media queries throughout the rest of your CSS.[emphasis added]" While the source order of the exact CSS in the listings (2.15) do work when located "near the top" of that stylesheet. I feel the quoted text is too general. If other properties in other declarations are desired to be altered, the media queries would need to be after the original declarations are made, not "near the top" of the stylesheet. While the quoted text is correct with the specific items in the examples, perhaps a mention about why it works in this case.

I've only read up to this point in the book, hopefully this topic will come up again, later. Just another example of "it depends", I guess. smilie

I'm enjoying the book and it's helping me better understand some details of CSS! Thanks!
Keith J Grant (36) [Avatar] Offline
I’m glad you’re enjoying the book!

Yes, this statement applies specifically to these two particular media queries and the code within. I go into media queries at much greater depth in chapter 8 on responsive design. I cover where to order media queries in general in that chapter.