web-bugs icon indicating copy to clipboard operation
web-bugs copied to clipboard

tabelog.com - layout is messed up

Open karlcow opened this issue 11 years ago • 12 comments

URL: http://tabelog.com/ Browser / Version: Firefox 39.0 Operating System: Android Problem type: Layout is messed up

Steps to Reproduce

  1. Navigate to: http://tabelog.com/

Expected Behavior: Displays like in WebKit/Blink browsers.

Actual Behavior: Things are missing here and there. Because of two things:

  1. regular gradient missing
  2. gradient property following a background property separated by a , instead of a ;

One you fixed the comma it's a lot better.

For example, the green search button doesn't have the magnifier.

.search-bar input[type = "submit"] {
    -webkit-appearance: none;
    display: block;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    height: 32px;
    border: solid 1px #719720;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    text-indent: -9999px;
    overflow: hidden;
    background-color: #99cc00;
    background: url(http://image1-3.tabelog.k-img.com/images/smartphone/icon/icon_search_white_2x.png) no-repeat center center, -webkit-gradient(linear, left top, left bottom, from(#99cc00), to(#7fa929));
    -webkit-background-size: 20px 20px, 100% 100%;
    background-size: 20px 20px, 100% 100%;
    -webkit-box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.2) inset, 0px 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.2) inset, 0px 1px 1px rgba(0, 0, 0, 0.2);
}

or the top premium lead

.top-premium-lead {
    margin-bottom: 10px;
    background-color: #ecc6c6;
    background: url(http://image1-3.tabelog.k-img.com/images/smartphone/premium/bg_btn_premium.png) no-repeat 50% 0,
    -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b72e5e), color-stop(10%,#af184d), color-stop(20%,#a7013b), to(#a7013b));
    -webkit-background-size: 320px 100px;
    background-size: 320px 100px;
}

These are easy to fix. You may want to use for fixing the CSS http://hallvord.com/temp/moz/cssfixme.php

A couple of places there are missing z-index to show the label on top of the background. Here for example a z-index solves an issue.

ul.search-item-list li.item-check input[type = "checkbox"] + label {
    display: block;
    position: absolute;
    z-index: 200;
    top: 0;
    left: 0;
/*  -webkit-box-sizing: border-box; */
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    padding: 0 35px 0 10px;
    font-weight: bold;
    line-height: 42px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

See also https://bugzilla.mozilla.org/show_bug.cgi?id=960431

country: jp

karlcow avatar Apr 17 '15 07:04 karlcow

Firefox Unprefixed

We can see that the gradients are not solved.

tabelog-unprefixed

karlcow avatar Apr 22 '15 06:04 karlcow

Mozilla Japan has a contact. Tomoya or other guy will contact them.

kudodo avatar May 13 '15 09:05 kudodo

Here's another issue (that is only visible if you have an Android version in the UA string):

STR:

  1. load s.tabelog.com
  2. let page load

EXPECTED: As you scroll down the page, there's a parallax effect revealing an ad (try in Chrome)

ACTUAL: There's an ad that appears on top of the other content on page load.

This wasn't seen before because the ad script at http://s.yimg.jp/bdv/yahoo/rl/js/tabelog/4833a1c23dd8c82cbd12/primewindow.js?2.1.0 only works if there's an Android version in the UA string.

After it does work, it unfortunately relies on a WebKit CSS bug for its effect. I'm not so sure who has the bug right now.

I have a workaround, but it would require us to find out who owns the primewindow.js script.

http://jsbin.com/povojudobi/3/edit?html,css,output is a reduced version of the bug. http://jsbin.com/povojudobi/5/edit has the workaround (the fix is to use position: absolute and clip, rather than rely on the buggy behavior of overflow: hidden for position: fixed elements).

miketaylr avatar May 29 '15 22:05 miketaylr

Doing some digging in Bugzilla-land, the closest thing I found is https://bugzilla.mozilla.org/show_bug.cgi?id=864651#c8:

fixed-positioned boxes are kids of the viewport, so not affected by overflow styles on DOM ancestors.

That would indicate that Gecko is doing the right thing here and Blink/WebKit should not be honoring overflow: hidden of the fixed positioned ad's container. That seems consistent with the following definition from http://dev.w3.org/csswg/css-position/#fixed-pos:

Fixed positioning is similar to absolute positioning. The only difference is that for a fixed positioned box, the containing block is established by the viewport.

@dholbert, would you mind taking a look at http://jsbin.com/povojudobi/3/edit?html,css,output and confirming that Gecko does the right thing? (Comparing to Chrome/Chromium)?

miketaylr avatar Jun 01 '15 17:06 miketaylr

Right, fixed position stuff can overflow outside of "overflow:hidden" containers IIRC (per the spec text you quoted).

As discussed in IRC, Firefox and Chrome (tested 42 and 45) actually render that jsbin the same, though chrome does something weird (clipping the pink div to its overflow:hidden container) if you hit f12 to enter their equivalent of responsive design mode. Not sure if that's a bug or a quirk that they only have enabled on mobile + responsive-design-mode.

dholbert avatar Jun 04 '15 04:06 dholbert

Thanks for confirming the spec bits @dholbert.

And here's a revised test case that should display the bug more easily on Chrome Mobile vs Firefox on Android: https://miketaylr.com/bzla/fixed-overflow.html

The main difference here from the fiddle is user-scalable=no. So it seems that Blink/WebKit will clip fixed position content when certain viewport conditions are met, which appears to be a bug.

miketaylr avatar Jun 04 '15 04:06 miketaylr

I have sent a report about gradient issue.

chikoski avatar Jun 05 '15 09:06 chikoski

Kakaku.com started diagnosis tabelog.

@karlcow

A couple of places there are missing z-index to show the label on top of the background. Here for example a z-index solves an issue.

Could you list all selectors which have same issue? That list will help them to fix their site.

chikoski avatar Jun 08 '15 04:06 chikoski

I will do something a lot simpler (they could do too).

  1. Download all the CSS that I know on the site.
  2. Normalized all of them
  3. Put them all through css fix me, save them locally with *-fixed.css
  4. Normalized all of the *-fixed.css
  5. Make a diff with git diff foobar.css foobar-fixed.css

This can be useful for anyone. :)

ok let's see.

No need to be fixed.

  • announcement_ssl.css
  • entry_button.css
  • policy.css
  • show.css
  • synmenu.css
  • tabelog_glyph.css

Need to be fixed

I made a zip file of before and after the CSS has been fixed.

It doesn't fix everything. Some of the styles are created locally on the element either in the templates or through JavaScript.

karlcow avatar Jun 08 '15 05:06 karlcow

@karlcow Thank you! I will share the list you gave with the developers.

chikoski avatar Jun 09 '15 09:06 chikoski

Switching to sitewait according to Mozilla Japan seeAlso #1119

karlcow avatar Jun 18 '15 06:06 karlcow

The gradients and etc have been fixed. Thanks @chikoski ! and congrats.

karlcow avatar Jan 28 '16 07:01 karlcow