Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m.youdao.com - layout is messed up #3160

Open
MDTsai opened this issue Sep 7, 2016 · 6 comments
Open

m.youdao.com - layout is messed up #3160

MDTsai opened this issue Sep 7, 2016 · 6 comments
Labels
browser-firefox-mobile engine-gecko The browser uses the Gecko rendering engine severity-minor The site has a cosmetic issue.
Milestone

Comments

@MDTsai
Copy link

MDTsai commented Sep 7, 2016

URL: http://m.youdao.com/
Browser / Version: Firefox Mobile 51.0
Operating System: Android 5.1.1
Problem type: Layout is messed up

Steps to Reproduce

  1. Navigate to: http://m.youdao.com/

Expected Behavior: Search button looks good

Actual Behavior: Only half search button

Problem should be in the CSS style of search button use .

Screenshot Description

From webcompat.com with ❤️

@tsl143
Copy link
Member

tsl143 commented Sep 7, 2016

Can be reproduced , even in responsive design mode.

@MDTsai
Copy link
Author

MDTsai commented Oct 13, 2016

Problem is the default height of input element. There is no value in the input element.

Firefox gives default height 2px but Chrome gives default height according to user agent style:

{
  inline-height: normal # I guess it's 16px by default
}

I'm not sure if it's possible to fix like this: https://jsfiddle.net/6cvzdf0g/2/

.btn {
    white-space: pre; # origin is nowrap
}
.btn::-moz-focus-inner { 
    border: 0; # disable the border
}

@karlcow, could you help to give a better solution?

@wisniewskit
Copy link
Member

wisniewskit commented Nov 15, 2016

@MDTsai: in truth, they really should be using CSS flexbox for this kind of thing these days. But if they don't wanna, then adding these rules should work fine instead:

.search-bar { /* the form */
  height:1px; /* the actual value here doesn't matter, we just have to specify one */
}

.search-bar .input-group-btn { /* the wrapper inside it that the button is inside */
  height: 100%;
}

.search-bar .btn { /* the button input itself */
  height: 100%;
  display: block;
  background-position: 50% 50%;
}

This forces the button to be 100% the height of its parent, which in turn is 100% of the height of the form. The form is set to display:table, so it doesn't matter what height we give it above, it will just be whatever height it should be based on the other "table cells". This way the border can also stay.

@MDTsai
Copy link
Author

MDTsai commented Nov 18, 2016

Fill form for this issue to youdao, thanks @wisniewskit !

@MDTsai
Copy link
Author

MDTsai commented Dec 20, 2016

Youdao has github account @netease-youdao , ping @bartonding to see if we can have get connection from anyone in youdao.

@karlcow karlcow added this to the sitewait milestone Oct 30, 2017
@miketaylr miketaylr added the engine-gecko The browser uses the Gecko rendering engine label Apr 30, 2019
@cipriansv cipriansv added the severity-minor The site has a cosmetic issue. label Aug 21, 2019
@cipriansv
Copy link

I retested the issue and it is still reproducible on my side.

image

Tested with:
Browser / Version: Firefox Nightly 68.1a1 (2019-08-20), Firefox Preview 1.3.0 (Build #12321503)
Operating System: Huawei P10 (Android 8.0) - 1080 x 1920 pixels (~432 ppi pixel density)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox-mobile engine-gecko The browser uses the Gecko rendering engine severity-minor The site has a cosmetic issue.
Projects
None yet
Development

No branches or pull requests

7 participants