Chromium Code Reviews| Index: ui/webui/resources/html/md_select_css.html |
| diff --git a/ui/webui/resources/html/md_select_css.html b/ui/webui/resources/html/md_select_css.html |
| index 7217ff3b03f4683a3c36d40e5aed41bab249f6a9..17975c06e9cfbc3c3b9be496622daac42fc58995 100644 |
| --- a/ui/webui/resources/html/md_select_css.html |
| +++ b/ui/webui/resources/html/md_select_css.html |
| @@ -4,26 +4,27 @@ |
| <dom-module id="md-select"> |
| <template> |
| <style> |
| + .md-select, |
| + .md-select-underline { |
| + --md-side-padding: 12px; |
| + } |
| + |
| .md-select { |
| --md-arrow-width: 0.9em; |
| -webkit-appearance: none; |
| /* Ensure that the text does not overlap with the down arrow. */ |
| - -webkit-padding-end: calc(var(--md-arrow-width) * 1.8); |
| + -webkit-padding-end: calc(var(--md-side-padding) + var(--md-arrow-width) * 1.8); |
| + -webkit-padding-start: var(--md-side-padding); |
| background: url( |
| - chrome://resources/images/arrow_down.svg) 97% center no-repeat; |
| + chrome://resources/images/arrow_down.svg) calc(97% - var(--md-side-padding)) center no-repeat; |
|
Dan Beam
2017/04/11 21:24:29
wrap at 80 cols
dpapad
2017/04/11 21:51:40
Done.
|
| background-size: var(--md-arrow-width); |
| - border-bottom: 1px solid var(--paper-grey-300); |
| - border-left: none; |
| - /* Override Mac's default border-radius */ |
| - border-radius: 0; |
| - border-right: none; |
| - border-top: none; |
| + border: none; |
| color: var(--primary-text-color); |
| cursor: pointer; |
| font-family: inherit; |
| font-size: inherit; |
| outline: none; |
| - padding-bottom: 3px; |
| + padding-bottom: 4px; |
| padding-top: 3px; |
| width: var(--md-select-width, 200px); |
| } |
| @@ -37,20 +38,35 @@ |
| } |
| :host-context([dir=rtl]) .md-select { |
| - background-position-x: 3%; |
| + background-position-x: calc(var(--md-side-padding) + 3%); |
| } |
| + /* Persistent underline */ |
| .md-select-underline { |
| + border-top: 1px solid var(--paper-grey-300); |
| + display: block; |
| + margin: 0 var(--md-side-padding); |
| + } |
| + |
| + /* Focus underline */ |
| + .md-select-underline::after { |
| border-top: 2px solid var(--google-blue-500); |
| + content: ''; |
| display: block; |
| - position: relative; |
| - top: -1px; |
| transform: scale3d(0, 1, 1); |
| transition: transform 200ms ease-in; |
| - width: 100%; |
| } |
| - .md-select:focus + .md-select-underline { |
| + /* Force the thicker "focus" underline to be properly overlapping with the |
| + "persistent" underline, and also make it visible by 1px while the |
| + <select> is expanded. */ |
|
Dan Beam
2017/04/11 21:24:29
nit: asterisk at beginning of lines
/* Force the
dpapad
2017/04/11 21:51:40
Done.
|
| + .md-select-underline, |
| + .md-select-underline::after { |
| + position: relative; |
| + top: -1px; |
| + } |
| + |
| + .md-select:focus + .md-select-underline::after { |
| transform: scale3d(1, 1, 1); |
| transition: transform 200ms ease-out; |
| } |