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

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

Issue 2081873008: Changed look of pin keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 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
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 /* TODO(jdufault): Remove this CSS once we inline the PIN element with the 17 /* TODO(jdufault): Remove this CSS once we inline the PIN element with the
18 * user-pod. */ 18 * user-pod. */
19 #container-constrained-width { 19 #container-constrained-width {
jdufault 2016/06/22 18:03:43 This entire block should be removed.
sammiequon 2016/06/22 23:05:39 Done.
20 -webkit-tap-highlight-color: transparent; 20 -webkit-tap-highlight-color: transparent;
21 background: white; 21 background: white;
22 border-radius: 2px;
23 box-shadow: 0 4px 23px 5px rgba(0, 0, 0, 0.2),
24 0 2px 6px rgba(0, 0, 0, 0.15),
25 0 3px 0 rgba(0, 0, 0, 0.08);
26 cursor: pointer; 22 cursor: pointer;
27 flex-direction: column; 23 flex-direction: column;
28 outline: none; 24 outline: none;
29 } 25 }
30 26
31 .row { 27 .row {
32 display: flex; 28 display: flex;
33 } 29 }
34 30
35 .row.horizontal-center { 31 .row.horizontal-center {
36 justify-content: center; 32 justify-content: center;
37 } 33 }
38 34
39 .digit-button { 35 .digit-button {
40 align-items: center; 36 align-items: center;
41 background: none; 37 background: none;
42 border-radius: 50px; 38 border-radius: 50px;
39 box-sizing: border-box;
43 display: flex; 40 display: flex;
41 flex-direction: column;
44 font-size: 30px; 42 font-size: 30px;
43 height: 70px;
45 justify-content: center; 44 justify-content: center;
46 margin: 5px; 45 margin: 0;
47 min-width: 94px; 46 min-height: 70px;
48 width: 94px; 47 min-width: 85px;
48 padding: 15px 20px;
49 width: 85px;
50 }
51
52 .digit-button .icon-button {
53 height: 100%;
54 }
55
56 .digit-button .icon-button .icon-div,
57 .digit-button .icon-div {
58 background: var(--paper-grey-500);
59 border-radius: 100px;
60 height: 24px;
61 margin: auto;
62 width: 24px;
63 }
64
65 .digit-button .icon-button .icon-div .icon,
66 .digit-button .icon-div .icon {
67 color: white;
68 display: block;
69 height: 16px;
70 left: 4px;
71 top: 4px;
72 width: 16px;
73 }
74
75 .digit-button .icon-button .text-div {
76 text-align: center;
77 }
78
79 .digit-button .icon-button .text-div .text {
80 color: var(--paper-grey-500);
81 font-size: 10px;
82 padding: 10px;
83 text-transform: capitalize;
49 } 84 }
50 85
51 .digit-button inner-text { 86 .digit-button inner-text {
52 display: flex; 87 display: flex;
53 flex-direction: column; 88 flex-direction: column;
54 height: 52px; 89 height: 52px;
55 } 90 }
56 91
57 .digit-button inner-text subhead { 92 .first-row {
58 color: var(--paper-grey-500); 93 height: 54px;
59 font-size: 16px; 94 min-height: 54px;
60 }
61
62 .digit-button .submit-button {
63 background: var(--paper-blue-a400);
64 color: white;
65 font-size: 20px;
66 height: 60px;
67 min-width: 0;
68 width: 60px;
69 } 95 }
70 96
71 #pin-input { 97 #pin-input {
72 -webkit-text-security: disc; 98 -webkit-text-security: disc;
73 border-bottom-color: lightgray; 99 border: 0;
74 border-left: none;
75 border-right: none;
76 border-top: none;
77 font-size: 20px; 100 font-size: 20px;
78 height: 30px; 101 height: 54px;
79 margin-top: 10px;
80 text-align: center; 102 text-align: center;
81 width: 95%; 103 width: 75%;
82 } 104 }
83 105
84 #pin-input[type=number]::-webkit-inner-spin-button, 106 #pin-input[type=number]::-webkit-inner-spin-button,
85 #pin-input[type=number]::-webkit-outer-spin-button { 107 #pin-input[type=number]::-webkit-outer-spin-button {
86 -webkit-appearance: none; 108 -webkit-appearance: none;
87 margin: 0; 109 margin: 0;
88 } 110 }
89 111
90 /* Ensure that all children of paper-button do not consume events. This 112 /* Ensure that all children of paper-button do not consume events. This
91 * simplifies the event handler code. */ 113 * simplifies the event handler code. */
92 paper-button * { 114 paper-button * {
93 pointer-events: none; 115 pointer-events: none;
94 } 116 }
95 </style> 117 </style>
96 118
97 <div id="root"> 119 <div id="root">
98 <div id="container-constrained-width"> 120 <div id="container-constrained-width">
99 <div class="row horizontal-center"> 121 <div class="row horizontal-center">
100 <input id="pin-input" type="number" placeholder="Enter PIN" 122 <input id="pin-input" type="number" placeholder="Enter PIN"
101 on-keydown="onInputKeyDown_"></input> 123 on-keydown="onInputKeyDown_"></input>
124 <div class="digit-button first-row">
125 <paper-button class="digit-button submit-button"
126 on-tap="onPinSubmit_">
127 <div class="icon-div">
128 <iron-icon class="icon" icon="icons:forward"><iron-icon>
129 </div>
130 </paper-button>
131 </div>
102 </div> 132 </div>
103 133
104 <div class="row keyboard"> 134 <div class="row keyboard">
105 <paper-button class="digit-button" on-tap="onNumberTap_" value="1"> 135 <paper-button class="digit-button" on-tap="onNumberTap_" value="1">
106 <inner-text>1</inner-text> 136 <inner-text>1</inner-text>
107 </paper-button> 137 </paper-button>
108 <paper-button class="digit-button" on-tap="onNumberTap_" value="2"> 138 <paper-button class="digit-button" on-tap="onNumberTap_" value="2">
109 <inner-text>2<subhead>ABC</subhead></inner-text> 139 <inner-text>2</inner-text>
110 </paper-button> 140 </paper-button>
111 <paper-button class="digit-button" on-tap="onNumberTap_" value="3"> 141 <paper-button class="digit-button" on-tap="onNumberTap_" value="3">
112 <inner-text>3<subhead>DEF</subhead></inner-text> 142 <inner-text>3</inner-text>
113 </paper-button> 143 </paper-button>
114 </div> 144 </div>
115 <div class="row keyboard"> 145 <div class="row keyboard">
116 <paper-button class="digit-button" on-tap="onNumberTap_" value="4"> 146 <paper-button class="digit-button" on-tap="onNumberTap_" value="4">
117 <inner-text>4<subhead>GHI</subhead></inner-text> 147 <inner-text>4</inner-text>
118 </paper-button> 148 </paper-button>
119 <paper-button class="digit-button" on-tap="onNumberTap_" value="5"> 149 <paper-button class="digit-button" on-tap="onNumberTap_" value="5">
120 <inner-text>5<subhead>JKL</subhead></inner-text> 150 <inner-text>5</inner-text>
121 </paper-button> 151 </paper-button>
122 <paper-button class="digit-button" on-tap="onNumberTap_" value="6"> 152 <paper-button class="digit-button" on-tap="onNumberTap_" value="6">
123 <inner-text>6<subhead>MNO</subhead></inner-text> 153 <inner-text>6</inner-text>
124 </paper-button> 154 </paper-button>
125 </div> 155 </div>
126 <div class="row keyboard"> 156 <div class="row keyboard">
127 <paper-button class="digit-button" on-tap="onNumberTap_" value="7"> 157 <paper-button class="digit-button" on-tap="onNumberTap_" value="7">
128 <inner-text>7<subhead>PQRS</subhead></inner-text> 158 <inner-text>7</inner-text>
129 </paper-button> 159 </paper-button>
130 <paper-button class="digit-button" on-tap="onNumberTap_" value="8"> 160 <paper-button class="digit-button" on-tap="onNumberTap_" value="8">
131 <inner-text>8<subhead>TUV</subhead></inner-text> 161 <inner-text>8</inner-text>
132 </paper-button> 162 </paper-button>
133 <paper-button class="digit-button" on-tap="onNumberTap_" value="9"> 163 <paper-button class="digit-button" on-tap="onNumberTap_" value="9">
134 <inner-text>9<subhead>WXYZ</subhead></inner-text> 164 <inner-text>9</inner-text>
135 </paper-button> 165 </paper-button>
136 </div> 166 </div>
137 <div class="row keyboard"> 167 <div class="row keyboard">
138 <div class="digit-button"></div> 168 <div class="digit-button"></div>
139 <paper-button class="digit-button" on-tap="onNumberTap_" value="0"> 169 <paper-button class="digit-button" on-tap="onNumberTap_" value="0">
140 <inner-text>0</inner-text> 170 <inner-text>0</inner-text>
141 </paper-button> 171 </paper-button>
142 <div class="digit-button"> 172 <paper-button class="digit-button clear-button" on-tap="onPinClear_">
143 <paper-icon-button class="digit-button submit-button" 173 <div class="icon-button">
144 icon="icons:check" on-tap="onPinSubmit_"> 174 <div class="icon-div">
jdufault 2016/06/22 18:03:44 icon-button, icon-div, text-div can all be done us
sammiequon 2016/06/22 23:05:39 Done.
sammiequon 2016/06/22 23:05:40 icon-div is used to highlight the background of th
145 </paper-icon-button> 175 <iron-icon class="icon" icon="icons:clear"><iron-icon>
146 </div> 176 </div>
177 <div class="text-div">
178 <inner-text class="text">Clear</inner-text>
179 </div>
180 </div>
181 </paper-button>
147 </div> 182 </div>
148 </div> 183 </div>
149 </div> 184 </div>
150 </template> 185 </template>
151 <script src="pin_keyboard.js"></script> 186 <script src="pin_keyboard.js"></script>
152 </dom-module> 187 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698