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

m.gamer.com.tw - Small allocated space for “Search” result titles

Open softvision-oana-arbuzov opened this issue 9 years ago • 9 comments

URL: https://m.gamer.com.tw/search.php?q=lineage

Browser / Version: Firefox Mobile Nightly 57.0a1 (2017-08-31) Operating System: Huawei P10 (Android 7.0) - Resolution 1080 x 1920 pixels (~432 ppi pixel density) Tested Another Browser: Yes

Problem type: Design is broken Description: Small allocated space for “Search” result titles

Steps to Reproduce:

  1. Navigate to: https://m.gamer.com.tw/search.php?q=lineage.
  2. Observe “Search” result titles.

Expected Behavior: Title text is fully visible.

Actual Behavior: Title text is cropped.

Note:

  1. Reproducible on Firefox 55.0.3 Release (Mobile).
  2. Not reproducible on Chrome (Mobile) 60.0.3112.107.
  3. Screenshot attached.

Watchers: @softvision-sergiulogigan @softvision-oana-arbuzov

sv; country: tw Screenshot Description

From webcompat.com with ❤️

softvision-oana-arbuzov avatar Sep 01 '17 08:09 softvision-oana-arbuzov

Usual matter of font-size and line-height with the combination of

.gsc-result .gs-title {
	height: 1.4em;
	overflow: hidden;
}

Removing overflow fixes the issue.

karlcow avatar Sep 19 '17 04:09 karlcow

Google provides the search result, CSS files are located in google server, should we contact google instead?

MDTsai avatar Dec 06 '17 09:12 MDTsai

Hi @karlcow and @miketaylr , I am not sure that removing overflow would fixe the issue. Could you please have a look? Thanks :)

After removing overflow, screen shot 2018-09-23 at 2 35 44

Before removing overflow, screen shot 2018-09-23 at 2 35 14

Firefox nightly 64.0a1 (2018-09-20) (64-bit)

cynthiatang avatar Sep 23 '18 06:09 cynthiatang

(i'll let @karlcow answer, he knows CSS better than I do :))

miketaylr avatar Sep 24 '18 16:09 miketaylr

Yup @cynthiatang This is correct overflow makes it even worse.

Let's try again…

<div class="gs-webResult gs-result" style="background-color: antiquewhite;">
  <div class="gsc-thumbnail-inside" style="background-color: aqua;">
    <div class="gs-title" style="/*! font-size: 1.4em; */background-color: cornflowerblue;">
      <a class="gs-title" href="https://www.google.com/url?q=https://forum.gamer.com.tw/A.php%3Fbsn%3D842&amp;sa=U&amp;ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&amp;client=internal-uds-cse&amp;cx=014089690161002537259:kdfyeuhlx84&amp;usg=AOvVaw1NGPJdfhTFurGMr1cd38Jb" target="_blank" dir="ltr" data-cturl="https://www.google.com/url?q=https://forum.gamer.com.tw/A.php%3Fbsn%3D842&amp;sa=U&amp;ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&amp;client=internal-uds-cse&amp;cx=014089690161002537259:kdfyeuhlx84&amp;usg=AOvVaw1NGPJdfhTFurGMr1cd38Jb" data-ctorig="https://forum.gamer.com.tw/A.php?bsn=842" style="background-color: gold;">天堂<b>Lineage</b> 哈啦板- 巴哈姆特</a>
    </div>
  </div>
  <div class="gsc-url-top">
    <div class="gs-bidi-start-align gs-visibleUrl gs-visibleUrl-short" dir="ltr">forum.gamer.com.tw</div>
    <div class="gs-bidi-start-align gs-visibleUrl gs-visibleUrl-long" dir="ltr" style="word-break:break-all;">https://forum.gamer.com.tw/A.php?bsn=842</div>
  </div>
  <table class="gsc-table-result">
    <tbody>
      <tr>
        <td class="gsc-table-cell-thumbnail gsc-thumbnail" style="">
          <div class="gs-image-box gs-web-image-box gs-web-image-box-landscape">
            <a class="gs-image" href="https://forum.gamer.com.tw/A.php?bsn=842" target="_blank" data-cturl="https://www.google.com/url?q=https://forum.gamer.com.tw/A.php%3Fbsn%3D842&amp;sa=U&amp;ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&amp;client=internal-uds-cse&amp;cx=014089690161002537259:kdfyeuhlx84&amp;usg=AOvVaw1NGPJdfhTFurGMr1cd38Jb" data-ctorig="https://forum.gamer.com.tw/A.php?bsn=842"><img class="gs-image" onload="if (this.parentNode &amp;&amp; this.parentNode.parentNode &amp;&amp; this.parentNode.parentNode.parentNode) { this.parentNode.parentNode.parentNode.style.display = ''; this.parentNode.parentNode.className = 'gs-image-box gs-web-image-box gs-web-image-box-landscape'; } " src="https://p2.bahamut.com.tw/FORUM/welcome/00842_2_1510712779.JPG"></a>
          </div>
        </td>
        <td class="gsc-table-cell-snippet-close">
          <div class="gs-title gsc-table-cell-thumbnail gsc-thumbnail-left">
            <a class="gs-title" href="https://forum.gamer.com.tw/A.php?bsn=842" target="_blank" dir="ltr" data-cturl="https://www.google.com/url?q=https://forum.gamer.com.tw/A.php%3Fbsn%3D842&amp;sa=U&amp;ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&amp;client=internal-uds-cse&amp;cx=014089690161002537259:kdfyeuhlx84&amp;usg=AOvVaw1NGPJdfhTFurGMr1cd38Jb" data-ctorig="https://forum.gamer.com.tw/A.php?bsn=842">天堂<b>Lineage</b> 哈啦板- 巴哈姆特</a>
          </div>
          <div class="gs-bidi-start-align gs-snippet" dir="ltr">歡迎來到哈啦板,哈啦板提供資訊分享、精華查找、交流討論,參與討論前請詳閱板規 。
          </div>
          <div class="gsc-url-bottom">
            <div class="gs-bidi-start-align gs-visibleUrl gs-visibleUrl-short" dir="ltr">forum.gamer.com.tw</div>
            <div class="gs-bidi-start-align gs-visibleUrl gs-visibleUrl-long" dir="ltr" style="word-break:break-all;">https://forum.gamer.com.tw/A.php?bsn=842</div>
          </div>
          <div class="gs-richsnippet-box" style="display: none;"></div>
          <div class="gs-per-result-labels" url="https://forum.gamer.com.tw/A.php?bsn=842"></div>
        </td>
      </tr>
    </tbody>
  </table>
</div>

Screenshot Description

  • The a has a height: 1.2em -> 18px
  • the div.gs-title has a height: 1.2em -> 19.2px

but the line-height is inherited from the initial settings and quite high.

Once we specify a line-height on .gsc-result .gs-title we get the right design.

.gsc-result .gs-title {
	height: 1.2em;
	line-height: 1.2em;
}

Before

Screenshot Description

After

Screenshot Description

Rendering

Screenshot Description

Once we remove all the stuff for seeing the boxes.

Screenshot Description

karlcow avatar Sep 25 '18 00:09 karlcow

Thanks a lot @cynthiatang for the heads up.

karlcow avatar Sep 25 '18 00:09 karlcow

Great!! Thanks for your explanation. I just wanted to make sure that I will pass the right solution to the website's owner. That's why I tried to reproduce it. Thank you again. :)

cynthiatang avatar Sep 25 '18 14:09 cynthiatang

@softvision-oana-arbuzov after revisiting the site I am unable to reproduce this issue. Can you confirm this as well?

Note: Based on the attached screenshots it seems that Firefox still used "Clear Sans" as default sans-serif font. Since this has a different metrics than Roboto, we decided to set Roboto as default (see bz1392147) to fix compatibility problems.

reinhart1010 avatar Jun 20 '19 11:06 reinhart1010

@reinhart1010, I can confirm it is no longer reproducible.

Tested with: Browser / Version: Firefox Nightly 68.0a1 (2019-06-24), Fenix 1.0.1926 (Build #11761827 🦎 68.0-20190612114833) Operating System: LG G5 (Android 8.0.0) - 1440 x 2560 pixels (~554 ppi pixel density), Samsung Galaxy S7 Edge (Android 8.0.0) - Resolution 1440 x 2560 pixels (~534 ppi pixel density)

softvision-oana-arbuzov avatar Jun 26 '19 11:06 softvision-oana-arbuzov