Re: [mediaqueries] Trying to understand the syntax design

Okay thank you both for the explanation.

Do you know if there are any sources that I could cite regarding this?

Kind regards
Lucas Wiener

tis 5 maj 2015 kl 00:29 skrev Tab Atkins Jr. <jackalmage@gmail.com>:

> On Mon, May 4, 2015 at 7:37 AM, Florian Rivoal <florian@rivoal.net> wrote:
> > On 29 Apr 2015, at 14:11, Lucas Wiener <lucas@wiener.se> wrote:
> >> I'm trying to understand the reasons for the syntax design of media
> queries.
> >> Are there any reasons why media queries are written "@media (min-width:
> >> 500px) { … }" instead of "@media (width >= 500px) { … }"?
> >
> > Legacy. The min- and max- syntax were what was introduced way back,
> chiefly
> > (I believe, that's before my time) due to compat concerns of using the
> > < (and >) characters inside html.
>
> Yup.  It's from *way* back when, when you had to do the:
>
> <style>
> <!--
> styles here
> -->
> </style>
>
> trick to keep some legacy browsers from displaying your stylesheet as
> text.  It's been irrelevant for over a decade, which is why we finally
> added the originally-desired syntax to MQ4. ^_^
>
> ~TJ
>

Received on Monday, 11 May 2015 16:03:32 UTC