Commit 73648c63 authored by Katie Dektar's avatar Katie Dektar Committed by Commit Bot

Fix select-to-speak settings page display at small zoom levels.

Bug: 790964
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I6f8a4eb0cddd8bd695723645fbab551f3935fbd5
Reviewed-on: https://chromium-review.googlesource.com/803899
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521103}
parent 5c77455a
...@@ -45,7 +45,6 @@ h2 { ...@@ -45,7 +45,6 @@ h2 {
background-color: #fff; background-color: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
font-size: 13px; font-size: 13px;
line-height: 60px;
min-height: 60px; min-height: 60px;
padding: 0 20px; padding: 0 20px;
vertical-align: middle; vertical-align: middle;
...@@ -100,9 +99,19 @@ h2 { ...@@ -100,9 +99,19 @@ h2 {
padding: 0 20px; padding: 0 20px;
} }
label {
line-height: 60px;
vertical-align: middle;
}
.example { .example {
display: inline-block; display: inline-block;
float: right;
font-size: 1em;
height: 60px;
line-height: 60px;
padding: 0 3px; padding: 0 3px;
vertical-align: middle;
} }
.dark { .dark {
...@@ -110,10 +119,15 @@ h2 { ...@@ -110,10 +119,15 @@ h2 {
color: white; color: white;
} }
.light {
background: white;
}
.highlight { .highlight {
opacity: .3; opacity: .3;
z-index: 10; z-index: 10;
top: -45px; top: -40px;
position: relative; position: relative;
height: 2em; height: 20px;
width: 100%;
} }
...@@ -70,12 +70,14 @@ ...@@ -70,12 +70,14 @@
msgid="options_highlight_color_pink"> msgid="options_highlight_color_pink">
</option> </option>
</select> </select>
<div style="float:right"> <div class="example dark">
<span class="i18n example dark" msgid="options_highlight_dark"> <span class="i18n" msgid="options_highlight_dark"></span>
</span> <div class="highlight">
<span class="i18n example" msgid="options_highlight_light"> </div>
</span> </div>
<div class="highlight" id="highlightExample"> <div class="example light">
<span class="i18n" msgid="options_highlight_light"></span>
<div class="highlight">
</div> </div>
</div> </div>
</div> </div>
......
...@@ -158,8 +158,10 @@ SelectToSpeakOptionsPage.prototype = { ...@@ -158,8 +158,10 @@ SelectToSpeakOptionsPage.prototype = {
*/ */
setUpHighlightListener_: function() { setUpHighlightListener_: function() {
let onChange = function(value) { let onChange = function(value) {
let example = document.getElementById('highlightExample'); let examples = document.getElementsByClassName('highlight');
example.style.background = value; for (let i = 0; i < examples.length; i++) {
examples[i].style.background = value;
}
}; };
this.syncSelectControlToPref_('highlightColor', 'highlightColor', onChange); this.syncSelectControlToPref_('highlightColor', 'highlightColor', onChange);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment