Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(831)

Side by Side Diff: chrome/browser/resources/settings/controls/night_light_slider.html

Issue 2915753003: [Night Light] CL5: Schedule Settings (Closed)
Patch Set: Ready for review Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html><head>
2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys-behavior /iron-a11y-keys-behavior.html">
5 <link rel="import" href="../prefs/prefs_behavior.html">
6 </head><body><dom-module id="night-light-slider">
7 <template>
8 <style>
9 :host {
10 color: black;
11 cursor: default;
12 font-family: Sniglet;
stevenjb 2017/06/09 00:56:59 Sniglet? Ideally we shouldn't be defining a font-f
afakhry 2017/06/09 17:21:55 Done.
13 margin-top: 20px;
stevenjb 2017/06/09 00:56:59 We should probably avoid building margin into an e
afakhry 2017/06/09 17:21:54 Done.
14 padding: 0;
stevenjb 2017/06/09 00:56:59 Not needed?
afakhry 2017/06/09 17:21:54 Done.
15 text-align: center;
16 user-select: none;
17 }
18
19 #sliderContainer {
20 display: inline-block;
21 position: relative;
22 user-select: none;
23 width: 570px;
24 }
25
26 #sliderBar {
27 background-color: #ccc;
28 background-size: 100%;
29 display: inline-block;
30 height: 2px;
31 position: relative;
32 width: inherit;
33 }
34
35 .knob {
36 border-radius: 6px;
37 height: 12px;
38 left: 0;
39 margin-left: -6px;
40 margin-top: -5px;
41 position: absolute;
42 width: 12px;
43 z-index: 3;
44 }
45
46 .knob:focus {
47 box-shadow: 0 0 5pt 5pt rgb(204, 217, 245);
48 outline: none;
49 }
50
51 .expanded-knob {
52 transform: scale(1.5);
53 z-index: 3;
54 }
55
56 .start {
57 background: rgb(51, 103, 214);
58 }
59
60 .end {
61 background: rgb(51, 103, 214);
62 }
stevenjb 2017/06/09 00:56:59 combine these?
afakhry 2017/06/09 17:21:54 Yes, sure. I had them while I was experimenting wi
63
64 #progressContainer {
65 height: 100%;
66 overflow: hidden;
67 position: absolute;
68 width: 100%;
69 }
70
71 .progress {
72 background: rgb(51, 103, 214);
73 height: 100%;
74 position: absolute;
75 z-index: 1;
76 }
77
78 #labelContainer {
79 height: 2em;
80 }
81
82 .label {
83 border-radius: 14px;
84 color: white;
85 font-family: Roboto-Bold;
86 font-size: 12px;
87 left: 0;
88 line-height: 1.5em;
89 margin-left: -2.5em;
90 position: absolute;
91 text-align: center;
92 vertical-align: middle;
93 width: 5em;
94 }
95
96 .end-label-overlap {
97 margin-top: -2em;
98 }
99
100 #markersContainer {
101 display: flex;
102 height: 100%;
103 left: 0;
104 position: absolute;
105 width: 100%;
106 }
107
108 .markers {
109 background-color: black;
110 border-radius: 50%;
111 display: block;
112 height: 100%;
113 margin-left: -1px;
114 padding: 0;
115 position: absolute;
116 width: 2PX;
117 z-index: 2;
118 }
119
120 #legendContainer {
121 height: 10px;
122 position: relative;
123 width: inherit;
124 }
125
126 .legend {
stevenjb 2017/06/09 00:56:59 #legendContainer > div
afakhry 2017/06/09 17:21:54 Done.
127 color: rgb(100, 100, 100);
128 font-family: Roboto-Regular;
129 font-size: 12px;
130 margin-left: -2em;
131 position: absolute;
132 text-align: center;
133 top: 5px;
134 width: 4em;
135 }
136
stevenjb 2017/06/09 00:56:59 elim empty line
afakhry 2017/06/09 17:21:54 Done.
137 </style>
138
139 <div id="sliderContainer">
140 <div id="labelContainer">
141 <div id="startLabel" class="label start"
142 aria-label="$i18n{displayNightLightStartTime}">
143 [[startTime_]]
144 </div>
145 <div id="endLabel" class="label end"
146 aria-label="$i18n{displayNightLightStopTime}">
147 [[endTime_]]
148 </div>
149 </div>
150 <div id="sliderBar">
151 <div id="progressContainer">
152 <div id="endProgress" class="progress"></div>
153 <div id="startProgress" class="progress"></div>
154 </div>
155 <div id="markersContainer">
156 </div>
157 <div id="startKnob" class="knob start" tabindex="1" on-down="drag_"
158 on-up="drop_" on-track="continueDrag_"></div>
159 <div id="endKnob" class="knob end" tabindex="2" on-down="drag_"
160 on-up="drop_" on-track="continueDrag_"></div>
161 </div>
162 <div id="legendContainer">
163 <div class="legend" style="left: 0%;">6 PM</div>
164 <div class="legend" style="left: 25%;">12 AM</div>
165 <div class="legend" style="left: 50%;">6 AM</div>
166 <div class="legend" style="left: 75%;">12 PM</div>
167 <div class="legend" style="left: 100%;">6 PM</div>
168 </div>
169 </div>
170
171 </template>
172 </dom-module>
173 <script src="night_light_slider.js"></script></body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698