为什么 'projection' 是 link 标签中媒体属性的无效值?

Why is 'projection' an invalid value for the media attribute in a link tag?

根据w3.org validator

<link rel="stylesheet" href="css/style.css" media="screen, projection, tv" />   
由于 projection 值,

似乎不​​再有效。

我记不太清楚了,但这样就包含了全屏 Opera。 可能 Opera 也会加载带有 media="screen" 的文件。

为什么这个现在无效了?是否有另一种方法可以为“全屏/投影”设备提供额外的 CSS?

完整的错误信息说:

Bad value screen, projection, tv for attribute media on element link: Deprecated media type projection. For guidance, see the Media Types section in the current Media Queries specification.

... 和 "the current Media Queries specification" 链接到媒体查询 4,目前正在开发中。 MQ4 基本上弃用了除 allprintscreenspeech 之外的所有 CSS2.1 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.

据推测,验证器将值标记为无效,因为它违反了 "Authors must not use these media types".

的规定

我认为有效HTML5:

  1. link元素的media attribute表示:

    The value must be a valid media query.

  2. links to这个定义“有效的媒体查询”;

    A string is a valid media query if it matches the media_query_list production of the Media Queries specification. [MQ]

  3. links to这个规格:

    Media Queries (URL: http://www.w3.org/TR/css3-mediaqueries/), H. Lie, T. Çelik, D. Glazman, A. van Kesteren. W3C.

  4. http://www.w3.org/TR/css3-mediaqueries/的当前推荐是:

    http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/

  5. 提到的media_query_list定义在section 3:

    The media query syntax is described in terms of the CSS2 grammar. As such, rules not defined here are defined in CSS2. The media_query_list production defined below replaces the media_list production from CSS2. [CSS21]

  6. 它链接到建议 http://www.w3.org/TR/2011/REC-CSS2-20110607

  7. projectionrecognized media types

    之一

这里是 W3C HTML 检查器的维护者。大约 3 周前,我实施并向生产 W3C HTML 检查程序推送了发出这些新错误的更改;这个变化: https://github.com/validator/validator/commit/66c739a49afd050226a91f2b7f49662e0dcc9a09

我进行了更改,以便使 HTML 检查器符合当前的 CSS 媒体查询规范。如 中所述:

[...] MQ4 basically deprecates all the CSS2.1 media types except all, print, screen and speech, citing the use of media feature detection instead, saying:

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.

据推测,验证器将值标记为无效,因为它违反了“作者不得使用这些媒体类型”的规定。