Heather Stone Heather Stone - 1 month ago 10
CSS Question

Is there a purpose to repeating identical media query expressions in CSS?

I'm looking at some legacy code and see the following media query:

@media (min-width: 768px) and (min-width: 768px) and (min-width: 768px)


What is the purpose of the repeat identical
min-width
expressions, if any? I've never seen this before.

Answer

I'm guessing this is either an authoring mistake, or the result of a misconfigured preprocessor or a preprocessor bug. If this was a deliberate workaround for some kind of browser bug or something (IE? Safari? Chrome?), it hasn't been documented anywhere on the web.

This statement is equivalent to

@media (min-width: 768px)

(but if you're familiar with the standard, you probably already guessed as much)