Welcome Guest Search | Active Topics | Sign In | Register

Problem on media queries Options
yleung
Posted: Thursday, September 18, 2014 6:34:30 PM
Rank: Advanced Member
Groups: Member

Joined: 4/2/2014
Posts: 37
Dear support,

I am creating a mobile app that run media queries like the following:

@media all and (min-device-width: 400px) {
// styles here
}

I also need to make the web app run on your web browser control. Unfortunately, your browser fails on several tests on media queries when I run following test tools:
http://www.w3.org/Style/CSS/Test/MediaQueries/20120229/test_media_queries.html

And if I run the same test against Google Chrome, all tests pass.

Could you take a look this problem?

Thanks
Yuenho
eo_support
Posted: Friday, September 19, 2014 10:54:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We have looked into this issue and we support media queries fine. The problem is the return value for certain style properties are not as "clean" with our component as Chrome browser. For example, for the following HTML code:

Code: HTML/ASPX
<p id="test" style="text-decoration:underline;" onclick="test();">
	test
</p>


And the following JavaScript:

Code: JavaScript
function test()
{
	var p = document.getElementById("test");
	var s = document.defaultView.getComputedStyle(p);
	alert(s.getPropertyValue("text-decoration"));
}


In this sample the CSS sets "text-decoration". "text-decoration" has three sub-properties: text-decoration-line, text-decoration-style and text-decoration-color. In the above code only text-decoration-line is set.

Click the text and Google Chrome will display "underline", but our component will display "underline solid rgb(0, 0, 0)". Both values are correct and the styles have been properly applied in both cases. However our component also returned a more complete value that also includes the default value for other two sub-properties: text-decoration-color and text-decoration-style where as Google Chrome does not. The W3C test page checks the return value for "underline" in this case, that's why our component fails the test.

Our component is based on Google Chrome's source code, so it appears that the current version of Google Chrome "cleaned up" the return value. We will need to sync to the latest code base in order to have the same result as Chrome. We do sync with Google Chrome's codebase rather frequently. So this problem should not last long.

However as already explained, failing the test does not mean the styles are not properly applied or media query does not work. Media query and the corresponding style should work fine.

Thanks!

yleung
Posted: Friday, September 19, 2014 1:45:20 PM
Rank: Advanced Member
Groups: Member

Joined: 4/2/2014
Posts: 37
Thanks for the update!

If I see real problems on media queries on EO browser but doesn't happen on Chrome, I will let you know.

Thanks again..


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.