<section id="style-212" class="ctest">
<h3><span class="nature">[REQUIRED]</span> <span class="test-id">style-212</span> <code>handheld</code></h3>
<p class="desc">Tests whether the <code>@media</code> rule set to <code>handheld</code> is supported.</p>
<p class="media-handheld">FAIL</p>
<p class="eval">If the preceding paragraph reads "FAIL", the test fails.</p>
</section>
And the CSS:
@media handheld
{p.media-handheld {display:none;}}
So if the underlying rendering system responds to the @media handheld with “no this is not a handheld device” the rule isn’t applied and the the test “Fails”. But does it really? I am testing with a iPad which Webkit categorizes as NOT a handheld. So isn’t the fact that the rule is NOT applied the correct behaviour? I believe the answer is yes.
Seems like the test SHOULD be something like
“If the preceding sentence says that your device is NOT a handheld device and it is not a handheld device, then the test passes.”
And the HTML would be:
<p class="media-handheld”>This device is NOT a handheld device</p>
Alternatively one could invert the logic (probably better). But the point is that as far as I can tell, Webkit says that the iPad IS “all” and IS a “screen” but is NOT a “handheld” and NOT a “tv”. All of which are correct.
Ric
Hi Folks,
I think some of the @media tests are in need of tuning.
The definition of "handheld" is so wishy washy ("typically small screen and low bandwidth") that I think this test should just be removed. At the very least the instructions for grading the test should become "If the preceding paragraph reads FAIL when displayed on a device considered a handheld, this test fails."
For TV, the definition of the device may be clearer, but the criteria for passing is wrong -- the instructions for grading the test should be "If the preceding paragraph reads FAIL when displayed on a TV device, this test fails."
Similarly the instructions for grading the portrait and landscape tests need to be fixed to be orientation-specific:
"If the preceding paragraph reads FAIL when displayed in portrait orientation, this test fails." and:
"If the preceding paragraph reads FAIL when displayed in landscape orientation, this test fails."
Best,
Garth
Thanks, Daniel!
That's basically what I've been wondering, but I wasn't sure if the intent was to differentiate between 2.1 support and level 3 support, and if it was the case that if you support level 3 that maybe only some aspects of it are supported.
Would it make sense to reduce to two tests, "@media all" to test for 2.1 support and one of the width/orientation tests to check for level 3 support?
Matt
-----Original Message----- From: Daniel Weck
Sent: Friday, February 13, 2015 7:15 AM
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"epub-testsuite-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"epub-testsuite-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "epub-testsuite-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to epub-testsuite-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "epub-testsuite-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to epub-testsuite-discuss+unsub...@googlegroups.com.
Running through the @media styling tests this morning (EPUB 101, tests 210-213). I am kind of wondering what the tests are telling us. Take the “handheld” test (212). The HTML content is:
<section id="style-212" class="ctest">
<h3><span class="nature">[REQUIRED]</span> <span class="test-id">style-212</span> <code>handheld</code></h3>
<p class="desc">Tests whether the <code>@media</code> rule set to <code>handheld</code> is supported.</p>
<p class="media-handheld">FAIL</p>
<p class="eval">If the preceding paragraph reads "FAIL", the test fails.</p>
</section>
And the CSS:
@media handheld
{p.media-handheld {display:none;}}
So if the underlying rendering system responds to the @media handheld with “no this is not a handheld device” the rule isn’t applied and the the test “Fails”. But does it really? I am testing with a iPad which Webkit categorizes as NOT a handheld. So isn’t the fact that the rule is NOT applied the correct behaviour? I believe the answer is yes.
Seems like the test SHOULD be something like
“If the preceding sentence says that your device is NOT a handheld device and it is not a handheld device, then the test passes.”
And the HTML would be:
<p class="media-handheld”>This device is NOT a handheld device</p>
Alternatively one could invert the logic (probably better). But the point is that as far as I can tell, Webkit says that the iPad IS “all” and IS a “screen” but is NOT a “handheld” and NOT a “tv”. All of which are correct.
Ric
Hi Ric,
Thhe handheld test is gone, as are the other specific media type name tests. The only remaining test is for support for “all”, and the test now states it only checks for support for css 2.1 media type names.
I also kept the min-width test (for at least 1px) and changed it to state that it checks support for media queries support.
This way we can differentiate if any reading systems support only the more basic media queries.
And finally, the orientation tests remain (optional), but are now worded to more clearly indicate that they only apply if the device supports two orientations.
Do these sound better to you?
Matt
Subject: Re: Issues with @media tests
No worries. Now that I’ve got agreement from you and Garth, I’ll close off the issue in tracker.