sp.mainichi.jp - using WebKit CSS properties without standard equivalents. Some JS busted.
URL: http://sp.mainichi.jp Browser / Version: Firefox 39.0 Operating System: Android Problem type: Layout is messed up
Steps to Reproduce
- Navigate to: http://sp.mainichi.jp
- Scroll down until you reach wide blank areas under tabbed menus.
Expected Behavior: Having the list of articles.
Actual Behavior: White area. Some ads are not loaded. Some articles list are not being displayed.
The ad is managed by a couple of scripts.
<div class="ad">
<!-- DFP ad rec1 START -->
<!-- sp.mainichi.jp/index/rec1 -->
<div id="div-gpt-ad-1417092602970-0" style="width:300px; height:250px;">
<script type="text/javascript">
</script>
<script type="text/javascript" src="http://js1.nend.net/js/nendAdLoader.js"></script>
<script type="text/javascript"></script>
</div>
</div>
<!-- DFP ad rec1 END -->
</div>
The ads get displayed if Android purports a version number.
and the list of articles are happening in aside sections (strange use of aside btw).
<aside id="aside_all0" class="aside_all">
<div class="nav">
<ul class="base3">
<li class="current"><div><span>主要</span></div></li>
<li><div><span>くらし</span></div></li>
<li><div><span>スポーツ</span></div></li>
<li><div><span>オピニオン</span></div></li>
<li><div><span>エンタメ</span></div></li>
</ul>
</div>
<div class="viewport">
<div style="transition-property: transform; transition-timing-function: cubic-bezier(0, 0, 0.25, 1); transition-duration: 350ms; transform: translate3d(0px, 0px, 0px);" class="flipsnap3">
<aside class="item">
</aside>
<aside class="item">
</aside>
<aside class="item">
</aside>
</div><!-- /.flipsnap -->
</div><!-- viewport -->
</aside>
Version number doesn't change anything to the list of articles.
On the other hand the articles are contained in the div.viewport which is pushed to the right side. Adding a clear: left on .viewport solves the issue.
.viewport {
width: 100%;
overflow: hidden;
margin: 0px auto;
clear: left;
}
in common.js, they try to detect the version of Android. (I'm not waiting for the day Android will reach version 10.)
// OS, version
var USER_AGENT = navigator.userAgent;
var IS_WEBKIT = (USER_AGENT.match(/WebKit/)) ? true : false;
var IS_MOBILE = (USER_AGENT.match(/Mobile/)) ? true : false;
var OS = '';
var VER = 0;
if (USER_AGENT.match(/i(Phone|Pad).*OS ([0-9])_([0-9])/)) {
OS = 'ios';
VER = parseFloat(RegExp.$2 + "." + RegExp.$3);
} else if (USER_AGENT.match(/Android ([0-9]).([0-9])/)) {
OS = 'android';
VER = parseFloat(RegExp.$1 + "." + RegExp.$2);
}
var IS_MAINICHI = ($('body#m, body#mp').size() > 0) ? true : false;
var IS_SPONICHI = ($('body#s, body#sp').size() > 0) ? true : false;
// Android 4.0 以下のモバイルブラウザには、クラスをふる
if (OS == 'android' && VER < 4.1) {
$('#page').addClass('legacy_android');
}
in the CSS we can discover a couple of use of
background-position-x:4%;
background-position-y:12px;
a couple of wrong gradients too
background: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,1));
background: -webkit-gradient(linear, left 50%, left bottom, from(rgba(0,0,0,0)), to(rgba(0,0,0,1)));
The site needs to be contacted.
country: jp
We still need to figure out why the ads is not showing sometimes.
Firefox Aurora Screen 2

Firefox Unprefixed Screen 2

Firefox Aurora Screen 1

Firefox Unprefixed Screen 1

Mozilla Japan has contact, will contact them.
I've contacted Mainichi and they have fixed the problem. Please confirm.

Confirmed. Fixed.