New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653755 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

md-select/settings-dropdown-menu dropdown arrow overlaps text

Project Member Reported by michae...@chromium.org, Oct 7 2016

Issue description

In a native <select>, text does not overlay underneath the dropdown arrow: https://jsfiddle.net/v6r7d8c2/

The <settings-dropdown-menu> hides the native frame and uses a background image positioned at 97% 70% for the arrow: https://jsfiddle.net/szuetokm/

If we remove the <settings-dropdown-menu> |width| styling (so it fits the content), the result is similar: https://jsfiddle.net/k3Lyyfgh/


I played around with this a bit for the timezone dropdown menu, which can be quite long. Using a -webkit-padding-end value of twice the background-image width, combined with setting background-position-x to "right" (because 97% doesn't scale properly with different font sizes/zoom levels).

BTW, it would be easier to vertically center the dropdown arrow if you chop off the bottom 12px of the svg's viewbox. Otherwise the vertical position of the arrow won't scale easily with font sizes/zoom levels.
 

Comment 1 Deleted

[corrected links] Here is a before/after at various widths and font sizes:

before - https://jsfiddle.net/pjwL97v5/1
after - https://jsfiddle.net/sfsb48gh/

using a -webkit-padding-end of 1.5x and background-position: right 70%.

Cc: nyerramilli@chromium.org dpa...@chromium.org ranjitkan@chromium.org tkonch...@chromium.org
 Issue 653824  has been merged into this issue.
Status: Started (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/577dc9d546b6b77bb3ee2158e1aa4805d4f5adcd

commit 577dc9d546b6b77bb3ee2158e1aa4805d4f5adcd
Author: dpapad <dpapad@chromium.org>
Date: Fri Oct 07 21:33:22 2016

MD Settings: Ensure that long text does not overlap with <select> arrow.

Thanks to @michaelpg for the suggestions.

BUG= 653755 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2401093002
Cr-Commit-Position: refs/heads/master@{#423971}

[modify] https://crrev.com/577dc9d546b6b77bb3ee2158e1aa4805d4f5adcd/chrome/browser/resources/settings/images/arrow_down.svg
[modify] https://crrev.com/577dc9d546b6b77bb3ee2158e1aa4805d4f5adcd/chrome/browser/resources/settings/md_select_css.html

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified on ChromeOS 8911.0.0, 56.0.2894.0

Sign in to add a comment