为什么 'projection' 是 link 标签中媒体属性的无效值?
Why is 'projection' an invalid value for the media attribute in a link tag?
<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 基本上弃用了除 all
、print
、screen
和 speech
之外的所有 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:
link
元素的media
attribute表示:
The value must be a valid media query.
它links to这个定义“有效的媒体查询”;
A string is a valid media query if it matches the media_query_list
production of the Media Queries specification. [MQ]
它links to这个规格:
Media Queries (URL: http://www.w3.org/TR/css3-mediaqueries/), H. Lie, T. Çelik, D. Glazman, A. van Kesteren. W3C.
-
提到的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]
-
projection
是 recognized 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.
据推测,验证器将值标记为无效,因为它违反了“作者不得使用这些媒体类型”的规定。
<link rel="stylesheet" href="css/style.css" media="screen, projection, tv" />
由于 projection
值,似乎不再有效。
我记不太清楚了,但这样就包含了全屏 Opera。 可能 Opera 也会加载带有 media="screen" 的文件。
为什么这个现在无效了?是否有另一种方法可以为“全屏/投影”设备提供额外的 CSS?
完整的错误信息说:
Bad value
screen, projection, tv
for attributemedia
on elementlink
: Deprecated media typeprojection
. For guidance, see the Media Types section in the current Media Queries specification.
... 和 "the current Media Queries specification" 链接到媒体查询 4,目前正在开发中。 MQ4 基本上弃用了除 all
、print
、screen
和 speech
之外的所有 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:
link
元素的media
attribute表示:The value must be a valid media query.
它links to这个定义“有效的媒体查询”;
A string is a valid media query if it matches the
media_query_list
production of the Media Queries specification. [MQ]它links to这个规格:
Media Queries (URL: http://www.w3.org/TR/css3-mediaqueries/), H. Lie, T. Çelik, D. Glazman, A. van Kesteren. W3C.
提到的
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 themedia_list
production from CSS2. [CSS21]
之一projection
是 recognized 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
,screen
andspeech
, 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.
据推测,验证器将值标记为无效,因为它违反了“作者不得使用这些媒体类型”的规定。