validation error message

Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

validation error message

Vladislav Bushurov
https://validator.w3.org/check?uri=www.m2-spb.ru&charset=%28detect+automatically%29&doctype=Inline&group=0

Line 48, Column 155Bad value handheld, screen and (max-width: 640px), only screen and (max-device-width: 640px) for attribute media on element link: Expected a CSS media type but the query ended.

Line 49, Column 199Bad value screen and (min-width: 641px) and (max-width: 959px), only screen and (min-device-width: 641px) and (max-device-width: 959px) for attribute media on element link: Expected a CSS media feature but saw min-device-width instead.

Two days ago there was no one error in this place.
Are there errors in the code indeed?
New rules?
What's happened?



http://www.w3.org/TR/css3-mediaqueries/

Is that not valid?


=================================
Sincerely,
Vladislav Bushurov
Alexandr Real Estate
Admiralteysky Division
5 ul.Dekabristov, St.Petersburg
Russia, 190000
http://www.m2-spb.ru
Reply | Threaded
Open this post in threaded view
|

Re: validation error message

Michael[tm] Smith
Vladislav Bushurov <[hidden email]>, 2015-06-29 18:59 +0300:

> Archived-At: <http://www.w3.org/mid/1435593582.286924731@...>
>
>  https://validator.w3.org/check?uri=www.m2-spb.ru&charset=%28detect+automatically%29&doctype=Inline&group=0
>
> Line 48, Column 155 :  Bad value handheld, screen and (max-width: 640px),
> only screen and (max-device-width: 640px) for attribute media on element
> link: Expected a CSS media type but the query ended.
>
> Line 49, Column 199 :  Bad value screen and (min-width: 641px) and
> (max-width: 959px), only screen and (min-device-width: 641px) and
> (max-device-width: 959px) for attribute media on element link: Expected a
> CSS media feature but saw min-device-width instead.
>
> Two days ago there was no one error in this place.
> Are there errors in the code indeed?
> New rules?
> What's happened?
New rules. I changed the code and updated the validator a few days ago in
order to resolve some open bugs.

See:

  https://github.com/validator/validator/issues/82
  https://github.com/validator/validator/issues/83
  https://github.com/validator/validator/commit/af079e49bcd60b5344a3ac200d2273a5faeb2d49

So the validator is behaving as expected here.

>
> http://www.w3.org/TR/css3-mediaqueries/
>
> Is that not valid?

It’s outdated and superseded by http://www.w3.org/TR/mediaqueries-4/
(http://drafts.csswg.org/mediaqueries/).

See:

  - http://drafts.csswg.org/mediaqueries/#media-types “In addition, the
    following deprecated media types are defined. Authors must not use
    these media types; instead, it is recommended that they select
    appropriate media features that better represent the aspect of the
    device that they are attempting to style against.”

  - http://drafts.csswg.org/mediaqueries/#mf-deprecated “The following
  media features are deprecated. They kept for backward compatibility, but
  are not appropriate for newly written style sheets. Authors must not use
  them. ... To query for the size of the viewport (or the page box on page
  media), the width, height and aspect-ratio media features should be used,
  rather than device-width, device-height and device-aspect-ratio.”

I should refine the validator to emit a more-helpful message for this case.
To remind myself, I’ve opened an issue:

  https://github.com/validator/validator/issues/115

  —Mike

--
Michael[tm] Smith https://people.w3.org/mike

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: validation error message

shayari
This post has NOT been accepted by the mailing list yet.
In reply to this post by Vladislav Bushurov
I think this error is coming due to max-device-width, in fact it is not valid.

Try code like this:
@media all and (min-width: 800px) and (max-width: 1024px) {...}

It should be helpful.

Regards,
Shayari