m.gamer.com.tw - Small allocated space for “Search” result titles
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:
- Navigate to: https://m.gamer.com.tw/search.php?q=lineage.
- Observe “Search” result titles.
Expected Behavior: Title text is fully visible.
Actual Behavior: Title text is cropped.
Note:
- Reproducible on Firefox 55.0.3 Release (Mobile).
- Not reproducible on Chrome (Mobile) 60.0.3112.107.
- Screenshot attached.
Watchers: @softvision-sergiulogigan @softvision-oana-arbuzov
From webcompat.com with ❤️
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.
Google provides the search result, CSS files are located in google server, should we contact google instead?
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,

Before removing overflow,

Firefox nightly 64.0a1 (2018-09-20) (64-bit)
(i'll let @karlcow answer, he knows CSS better than I do :))
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&sa=U&ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&client=internal-uds-cse&cx=014089690161002537259:kdfyeuhlx84&usg=AOvVaw1NGPJdfhTFurGMr1cd38Jb" target="_blank" dir="ltr" data-cturl="https://www.google.com/url?q=https://forum.gamer.com.tw/A.php%3Fbsn%3D842&sa=U&ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&client=internal-uds-cse&cx=014089690161002537259:kdfyeuhlx84&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&sa=U&ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&client=internal-uds-cse&cx=014089690161002537259:kdfyeuhlx84&usg=AOvVaw1NGPJdfhTFurGMr1cd38Jb" data-ctorig="https://forum.gamer.com.tw/A.php?bsn=842"><img class="gs-image" onload="if (this.parentNode && this.parentNode.parentNode && 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&sa=U&ved=0ahUKEwjDu5Hy7dTdAhXFw7wKHYrUDKwQFggEMAA&client=internal-uds-cse&cx=014089690161002537259:kdfyeuhlx84&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>
- The
ahas aheight: 1.2em->18px - the
div.gs-titlehas aheight: 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
After
Rendering
Once we remove all the stuff for seeing the boxes.
Thanks a lot @cynthiatang for the heads up.
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. :)
@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, 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)