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

Side by Side Diff: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html

Issue 2100203003: Pin keyboard matches red lines (go/cros-quick-unlock-ux). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 5 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
1 <!-- TODO(crbug.com/603217): Use i18n instead of string literals. Figure out 1 <!-- TODO(crbug.com/603217): Use i18n instead of string literals. Figure out
2 what i18n to use for keypad, ie, does 1 ABC make 2 what i18n to use for keypad, ie, does 1 ABC make
3 sense in every scenario? --> 3 sense in every scenario? -->
4 4
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/paper-styl es.html"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/paper-styl es.html">
8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml">
9 9
10 <dom-module id="pin-keyboard"> 10 <dom-module id="pin-keyboard">
11 <template> 11 <template>
12 <style> 12 <style>
13 #root { 13 #root {
14 display: flex; 14 display: flex;
15 } 15 }
16 16
17 .row { 17 .row {
18 display: flex; 18 display: flex;
19 } 19 }
20 20
21 .row.horizontal-center { 21 .row.horizontal-center {
22 justify-content: center; 22 justify-content: center;
23 } 23 }
24 24
25 .digit-button { 25 .digit-button {
26 align-items: center; 26 align-items: center;
27 background: none; 27 background: none;
28 border-radius: 50px; 28 border-radius: 50px;
29 box-sizing: border-box; 29 box-sizing: border-box;
30 color: rgb(87, 101, 107);
jdufault 2016/06/27 19:17:52 Is there a paper-* color element that this value c
sammiequon 2016/06/29 21:26:12 Done.
30 display: flex; 31 display: flex;
31 flex-direction: column; 32 flex-direction: column;
32 font-size: 30px; 33 font-size: 32px;
33 height: 70px; 34 height: 70px;
34 justify-content: center; 35 justify-content: center;
35 margin: 0; 36 margin: 0 15px;
36 min-height: 70px; 37 min-height: 70px;
37 min-width: 85px; 38 min-width: 70px;
38 padding: 15px 20px; 39 padding: 15px 20px;
39 width: 85px; 40 width: 70px;
40 } 41 }
41 42
42 .digit-button.clear-button { 43 .digit-button.clear-button {
43 display: block; 44 display: block;
44 } 45 }
45 46
47 .digit-button.left-button {
48 margin: 0 15px 0 0;
49 }
50
51 .digit-button.right-button {
52 margin: 0 0 0 15px;
53 }
54
46 .digit-button .icon-container { 55 .digit-button .icon-container {
47 background: var(--paper-grey-500); 56 background: rgb(191, 197, 202);
jdufault 2016/06/27 19:17:52 Is there a paper-* color element that this value c
sammiequon 2016/06/29 21:26:12 Done.
48 border-radius: 100px; 57 border-radius: 100px;
49 height: 24px; 58 height: 24px;
50 margin: auto; 59 margin: auto;
51 width: 24px; 60 width: 24px;
52 } 61 }
53 62
63 .digit-button .icon-container.ready-background {
64 background: blue;
65 }
66
54 .digit-button .icon-container .icon { 67 .digit-button .icon-container .icon {
55 color: white; 68 color: white;
56 display: block; 69 display: block;
57 height: 16px; 70 height: 16px;
58 left: 4px; 71 left: 4px;
59 top: 4px; 72 top: 4px;
60 width: 16px; 73 width: 16px;
61 } 74 }
62 75
63 .digit-button .icon-subheading { 76 .digit-button .icon-subheading {
64 color: var(--paper-grey-500); 77 color: rgb(191, 197, 202);
jdufault 2016/06/27 19:17:52 Is there a paper-* color element that this value c
sammiequon 2016/06/29 21:26:12 Done.
65 font-size: 10px; 78 font-size: 10px;
66 padding: 10px; 79 left: 0;
80 position: absolute;
81 text-align: center;
67 text-transform: capitalize; 82 text-transform: capitalize;
83 top: 44px;
84 width: 100%;
68 } 85 }
69 86
70 .digit-button inner-text { 87 .digit-button inner-text {
71 display: flex; 88 display: flex;
72 flex-direction: column; 89 flex-direction: column;
73 height: 52px; 90 height: 52px;
74 } 91 }
75 92
76 .first-row { 93 .first-row {
77 height: 54px; 94 height: 64px;
78 min-height: 54px; 95 min-height: 64px;
96 padding: 28px 15px 12px 15px;
79 } 97 }
80 98
81 #pin-input { 99 #pin-input {
82 -webkit-text-security: disc; 100 -webkit-text-security: disc;
83 border: 0; 101 border: 0;
84 font-size: 20px; 102 font-size: 18px;
85 height: 54px; 103 height: 64px;
86 text-align: center; 104 left: 20px;
87 width: 171px; 105 padding: 28px 3px 12px 3px;
106 position: relative;
107 width: 180px;
88 } 108 }
89 109
90 #pin-input[type=number]::-webkit-inner-spin-button, 110 #pin-input[type=number]::-webkit-inner-spin-button,
91 #pin-input[type=number]::-webkit-outer-spin-button { 111 #pin-input[type=number]::-webkit-outer-spin-button {
92 -webkit-appearance: none; 112 -webkit-appearance: none;
93 margin: 0; 113 margin: 0;
94 } 114 }
95 115
96 /* Ensure that all children of paper-button do not consume events. This 116 /* Ensure that all children of paper-button do not consume events. This
97 * simplifies the event handler code. */ 117 * simplifies the event handler code. */
98 paper-button * { 118 paper-button * {
99 pointer-events: none; 119 pointer-events: none;
100 } 120 }
101 </style> 121 </style>
102 122
103 <div id="root"> 123 <div id="root">
104 <div id="container-constrained-width"> 124 <div id="container-constrained-width">
105 <div class="row horizontal-center"> 125 <div class="row horizontal-center">
106 <input id="pin-input" type="number" placeholder="Enter PIN" 126 <input id="pin-input" type="number" placeholder="Enter PIN"
107 value="{{value::input}}" 127 value="{{value::input}}"
108 on-keydown="onInputKeyDown_"></input> 128 on-keydown="onInputKeyDown_"></input>
109 <div class="digit-button first-row"> 129 <paper-button class="digit-button first-row
jdufault 2016/06/27 19:17:52 Will this fit on one line?
sammiequon 2016/06/29 21:26:12 Done.
110 <paper-button class="digit-button submit-button" 130 right-button submit-button"
111 on-tap="firePinSubmitEvent_"> 131 on-tap="firePinSubmitEvent_">
112 <div class="icon-container"> 132 <div class="icon-container">
113 <iron-icon class="icon" icon="icons:forward"><iron-icon> 133 <iron-icon class="icon" icon="icons:forward"><iron-icon>
114 </div> 134 </div>
115 </paper-button> 135 </paper-button>
116 </div>
117 </div> 136 </div>
118 137
119 <div class="row keyboard"> 138 <div class="row keyboard">
120 <paper-button class="digit-button" on-tap="onNumberTap_" value="1"> 139 <paper-button class="digit-button left-button" on-tap="onNumberTap_"
jdufault 2016/06/27 19:17:52 Instead of having two left/right classes, what abo
sammiequon 2016/06/29 21:26:12 Done.
140 value="1">
121 <inner-text>1</inner-text> 141 <inner-text>1</inner-text>
122 </paper-button> 142 </paper-button>
123 <paper-button class="digit-button" on-tap="onNumberTap_" value="2"> 143 <paper-button class="digit-button" on-tap="onNumberTap_" value="2">
124 <inner-text>2</inner-text> 144 <inner-text>2</inner-text>
125 </paper-button> 145 </paper-button>
126 <paper-button class="digit-button" on-tap="onNumberTap_" value="3"> 146 <paper-button class="digit-button right-button" on-tap="onNumberTap_"
147 value="3">
127 <inner-text>3</inner-text> 148 <inner-text>3</inner-text>
128 </paper-button> 149 </paper-button>
129 </div> 150 </div>
130 <div class="row keyboard"> 151 <div class="row keyboard">
131 <paper-button class="digit-button" on-tap="onNumberTap_" value="4"> 152 <paper-button class="digit-button left-button" on-tap="onNumberTap_"
153 value="4">
132 <inner-text>4</inner-text> 154 <inner-text>4</inner-text>
133 </paper-button> 155 </paper-button>
134 <paper-button class="digit-button" on-tap="onNumberTap_" value="5"> 156 <paper-button class="digit-button" on-tap="onNumberTap_" value="5">
135 <inner-text>5</inner-text> 157 <inner-text>5</inner-text>
136 </paper-button> 158 </paper-button>
137 <paper-button class="digit-button" on-tap="onNumberTap_" value="6"> 159 <paper-button class="digit-button right-button" on-tap="onNumberTap_"
160 value="6">
138 <inner-text>6</inner-text> 161 <inner-text>6</inner-text>
139 </paper-button> 162 </paper-button>
140 </div> 163 </div>
141 <div class="row keyboard"> 164 <div class="row keyboard">
142 <paper-button class="digit-button" on-tap="onNumberTap_" value="7"> 165 <paper-button class="digit-button left-button" on-tap="onNumberTap_"
166 value="7">
143 <inner-text>7</inner-text> 167 <inner-text>7</inner-text>
144 </paper-button> 168 </paper-button>
145 <paper-button class="digit-button" on-tap="onNumberTap_" value="8"> 169 <paper-button class="digit-button" on-tap="onNumberTap_" value="8">
146 <inner-text>8</inner-text> 170 <inner-text>8</inner-text>
147 </paper-button> 171 </paper-button>
148 <paper-button class="digit-button" on-tap="onNumberTap_" value="9"> 172 <paper-button class="digit-button right-button" on-tap="onNumberTap_"
173 value="9">
149 <inner-text>9</inner-text> 174 <inner-text>9</inner-text>
150 </paper-button> 175 </paper-button>
151 </div> 176 </div>
152 <div class="row keyboard"> 177 <div class="row keyboard">
153 <div class="digit-button"></div> 178 <div class="digit-button left-button"></div>
154 <paper-button class="digit-button" on-tap="onNumberTap_" value="0"> 179 <paper-button class="digit-button" on-tap="onNumberTap_" value="0">
155 <inner-text>0</inner-text> 180 <inner-text>0</inner-text>
156 </paper-button> 181 </paper-button>
157 <paper-button class="digit-button clear-button" on-tap="onPinClear_"> 182 <paper-button class="digit-button clear-button right-button"
183 on-tap="onPinClear_">
158 <div class="icon-container"> 184 <div class="icon-container">
159 <iron-icon class="icon" icon="icons:clear"><iron-icon> 185 <iron-icon class="icon" icon="icons:clear"><iron-icon>
160 </div> 186 </div>
161 <inner-text class="icon-subheading">Clear</inner-text> 187 <inner-text class="icon-subheading">Clear</inner-text>
162 </paper-button> 188 </paper-button>
163 </div> 189 </div>
164 </div> 190 </div>
165 </div> 191 </div>
166 </template> 192 </template>
167 <script src="pin_keyboard.js"></script> 193 <script src="pin_keyboard.js"></script>
168 </dom-module> 194 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698