Re: Is there a CSS media query for EPUB (or, later, PWP)?

> On 31 Oct 2015, at 11:43, Florian Rivoal <florian@rivoal.net> wrote:
> 
> 
>> On 31 Oct 2015, at 06:56, Ivan Herman <ivan@w3.org> wrote:
>> 
<skip/>
>> 
>> MQ4 does include media types and media features and I think it is a legitimate question whether there is a way to characterize and EPUB or, eventually, similar publications. Is it a print media? An EPUB should probably be considered as a screen media type, so the question is whether there are (and whether there should be) media features that differentiate them from other presentations.
> 
> The CSS WG considers media types to be a failed idea. Quoting from the level 4 media queries spec:
> 
>> media types have proven insufficient as a way of discriminating between devices with different styling needs. Some categories which were originally quite distinct, such as screen and handheld, have blended significantly in the years since their invention. Others, such as tty or tv, expose useful differences from the norm of a full-featured computer monitor, and so are potentially useful to target with different styling, but the definition of media types as mutually exclusive makes it difficult to use them in a reasonable manner; instead, their exclusive aspects are better expressed as media features such as grid or scan.

Good to know, thanks. (And the arguments sound perfectly clear to me:-)

> 
> Another thing that makes media features far superior to media types is that they are future proof, as they enable authors to write styles that work well on devices they have not anticipated, by reacting to the relevant characteristics of these devices.
> 
> The CSS WG will not add more media types, and is actively deprecating most of the existing ones. So an "epub" media type is pretty much out of question. On the other hand, media features to expose what makes an epub reader different from another medium are very much in scope.
> 
> We already have a few media features that should help authors make their styles conditional on distinctive aspects of (some) epub readers:
> 
> - scripting: tell apart UAs with and without javascript support
> 
> - pointer / hover: react to the type of pointing device
> 
> - update-frequency: differentiate between media that never changes once rendered (paper), those that can change but not animate (e-ink), and those that can change in real time (regular screens)
> 
> - overflow-block / overflow:inline: are we in a paged medium, or a scroll medium (plus additional subtleties)
> 
> I encourage you (and other people in the IG) to look at section 4,5,6,7,8 and 9 of the media queries level 4 specification (https://drafts.csswg.org/mediaqueries/#mf-dimensions). If you think that there are distinctive aspects of epub reading systems that authors would like to react to, but are not covered by the media features already specified, this would be valuable feedback to the CSSWG.

I will certainly do that (although the coming few days are a bit hectic for me), but, most probably, you guys who have more experience in the down-to-Earth issues when using CSS for publishing would have much more to contribute...

> 
> Based on your original mail, I suppose you'd like to see a media feature that would let you react to the UA/environment providing a table of contents. This might be worth looking into. We should probably start by gathering various use cases to see how the different media with TOCs behave, to figure out if this is an on/off switch, or if there are more variants (or if this is the correct axis at all). For example, we should look at different epub readers, pdf renderers, assistive technologies…

That was indeed my initial issue that triggered my question but, obviously, there may be other use cases.

Thanks a lot Florian

Ivan

> 
> - Florian


----
Ivan Herman, W3C
Digital Publishing Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
ORCID ID: http://orcid.org/0000-0003-0782-2704

Received on Sunday, 1 November 2015 00:16:01 UTC