Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright 2016 The Chromium Authors. All rights reserved. | 1 /* Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 html { | 6 html { |
| 7 margin: 0; | 7 margin: 0; |
| 8 padding: 0; | 8 padding: 0; |
| 9 } | 9 } |
| 10 | 10 |
| 11 body { | 11 body { |
| 12 height: 100%; | |
| 12 margin: 0; | 13 margin: 0; |
| 13 padding: 0; | 14 padding: 0; |
| 14 } | 15 } |
| 15 | 16 |
| 16 | 17 h1 { |
| 17 /* Header bar */ | 18 color: rgb(92, 97, 102); |
| 18 | 19 } |
| 19 header { | 20 |
| 21 /* Page container */ | |
| 22 #page-container { | |
| 23 margin-left: 155px; | |
| 24 max-height: calc(100% - 57px); /* Subtract total height of page header */ | |
|
ortuno
2016/12/06 10:16:05
Why do we want to always keep the header up top? W
mbrunson
2016/12/07 01:12:13
Yeah. That's much better.
Hiding and showing it
| |
| 25 overflow-y: auto; | |
| 26 } | |
| 27 | |
| 28 @media screen and (max-width: 600px) { | |
| 29 #page-container { | |
| 30 margin-left: 0; | |
| 31 } | |
| 32 } | |
| 33 | |
| 34 /* Page content */ | |
| 35 .page-content { | |
| 36 padding: 24px 16px; | |
| 37 } | |
| 38 | |
| 39 /* Page header */ | |
| 40 .page-header { | |
| 20 align-items: center; | 41 align-items: center; |
| 21 background-color: rgb(33, 150, 243); | 42 background-image: linear-gradient( |
| 43 white, white 40%, rgba(255, 255, 255, 0.92)); | |
| 44 border-bottom: 1px solid #eee; | |
| 22 display: flex; | 45 display: flex; |
| 23 flex-direction: row; | 46 height: 48px; |
| 24 font-size: 20pt; | 47 margin-left: 155px; |
| 25 height: 56px; | 48 padding-top: 8px; |
| 26 justify-content: flex-start; | 49 } |
| 27 padding: 0 16px; | 50 |
| 28 } | 51 .page-header > h1 { |
| 29 | 52 margin: 13px 0; |
| 30 .title { | 53 } |
| 31 color: white; | 54 |
| 32 display: inline-block; | 55 #menu-btn { |
| 33 margin-left: 8px; | 56 background-color: white; |
| 34 } | 57 background-image: url(../../../../ui/webui/resources/images/vr_overflow.svg); |
|
ortuno
2016/12/06 10:16:04
Per spec, we want the hamburger icon.
mbrunson
2016/12/07 01:12:13
Done.
| |
| 35 | 58 background-position: center; |
| 59 border: 0; | |
| 60 display: none; | |
| 61 height: 48px; | |
|
ortuno
2016/12/06 10:16:05
I think the icon size should be 24px but the targe
mbrunson
2016/12/07 01:12:13
Done.
| |
| 62 margin-left: 16px; | |
| 63 width: 48px; | |
| 64 } | |
| 65 | |
| 66 @media screen and (max-width: 600px) { | |
| 67 #menu-btn { | |
| 68 display: block; | |
| 69 } | |
| 70 | |
| 71 .page-header { | |
| 72 margin-left: 0; | |
| 73 } | |
| 74 | |
| 75 .page-header > h1 { | |
| 76 margin: 13px 0 13px 16px; | |
| 77 } | |
| 78 } | |
| 79 | |
| 80 /* Sidebar */ | |
| 81 #sidebar { | |
| 82 bottom: 0; | |
| 83 left: 0; | |
| 84 position: fixed; | |
| 85 right: 0; | |
| 86 top: 0; | |
| 87 transition: visibility 200ms ease; | |
|
ortuno
2016/12/06 10:16:04
optional: I put in ease as a placeholder (ease is
mbrunson
2016/12/07 01:12:13
Done.
| |
| 88 width: 155px; | |
| 89 } | |
| 90 | |
| 91 @media screen and (max-width: 600px) { | |
| 92 #sidebar { | |
| 93 width: auto; | |
| 94 visibility: hidden; | |
| 95 } | |
| 96 | |
| 97 #sidebar.open { | |
| 98 visibility: visible; | |
| 99 } | |
| 100 } | |
| 101 | |
| 102 /* Sidebar Contents */ | |
| 103 .sidebar-content { | |
| 104 background-color: white; | |
| 105 height: 100%; | |
| 106 width: 155px; | |
| 107 } | |
| 108 | |
| 109 .sidebar-content > header > h1 { | |
| 110 margin: 0; | |
| 111 padding: 21px 0 18px 23px; | |
| 112 } | |
| 113 | |
| 114 .sidebar-content ul { | |
| 115 list-style-type: none; | |
| 116 padding: 0; | |
| 117 } | |
| 118 | |
| 119 .sidebar-content button { | |
| 120 background-color: transparent; | |
| 121 border: 0; | |
| 122 color: #999; | |
| 123 cursor: pointer; | |
| 124 font: inherit; | |
| 125 line-height: 1.417em; | |
|
ortuno
2016/12/06 10:16:05
Why use line-height instead of height? Also this n
mbrunson
2016/12/07 01:12:13
Yes. It is really random. But that's the value chr
| |
| 126 margin: 6px 0; | |
| 127 padding: 0; | |
| 128 } | |
| 129 | |
| 130 .sidebar-content li { | |
|
ortuno
2016/12/06 10:16:05
How hard would it be to apply the style to the but
mbrunson
2016/12/07 01:12:13
I basically removed all styling from the li. The b
ortuno
2016/12/07 02:58:17
Good job! It looks really nice.
| |
| 131 -webkit-border-start: 6px solid transparent; | |
| 132 -webkit-padding-start: 18px; | |
| 133 cursor: pointer; | |
| 134 margin: 6px 0; | |
| 135 } | |
| 136 | |
| 137 .sidebar-content .selected { | |
| 138 -webkit-border-start-color: rgb(78, 87, 100); | |
| 139 } | |
| 140 | |
| 141 .sidebar-content .selected > button { | |
| 142 color: rgb(70, 78, 90); | |
| 143 } | |
| 144 | |
| 145 .sidebar-content li:hover { | |
| 146 background-color: #E0E0E0; | |
| 147 } | |
| 148 | |
| 149 .overlay { | |
| 150 background-color: rgba(0, 0, 0, .5); | |
| 151 bottom: 0; | |
| 152 left: 0; | |
| 153 position: absolute; | |
| 154 right: 0; | |
| 155 top: 0; | |
| 156 visibility: hidden; | |
| 157 } | |
| 158 | |
| 159 @media screen and (max-width: 600px) { | |
| 160 .sidebar-content { | |
| 161 transform: translateX(-155px); | |
|
ortuno
2016/12/06 10:16:05
So Polymer does two things differently. They:
1.
mbrunson
2016/12/07 01:12:13
Yikes! Caveats all over the place D: Ok. I'll use
| |
| 162 transition: transform 195ms; | |
| 163 transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1); | |
| 164 } | |
| 165 | |
| 166 .sidebar-content li { | |
| 167 line-height: 48px; | |
| 168 } | |
| 169 | |
| 170 .open .sidebar-content { | |
| 171 transform: translateX(0); | |
|
ortuno
2016/12/06 10:16:05
Same here, use translate3d.
mbrunson
2016/12/07 01:12:14
Done.
| |
| 172 transition: transform 195ms; | |
| 173 transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1); | |
|
ortuno
2016/12/06 10:16:05
Curious as to why you split this. The style guide
mbrunson
2016/12/07 01:12:13
Ah ok. Done.
| |
| 174 } | |
| 175 | |
| 176 .open .overlay { | |
| 177 transition: visibility 225ms; | |
| 178 transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1); | |
|
ortuno
2016/12/06 10:16:05
If you only have the transition property here ther
mbrunson
2016/12/07 01:12:14
I've moved this to .overlay. Done.
| |
| 179 visibility: visible; | |
| 180 } | |
| 181 } | |
| 36 | 182 |
| 37 /* Device table */ | 183 /* Device table */ |
| 38 | |
| 39 table { | 184 table { |
| 40 border: 1px solid #ccc; | |
| 41 border-collapse: collapse; | 185 border-collapse: collapse; |
| 42 margin: 0; | 186 margin: 0; |
| 43 padding: 0; | 187 padding: 0; |
| 44 width: 100%; | 188 width: 100%; |
| 45 } | 189 } |
| 46 | 190 |
| 47 table tr { | |
| 48 border: 1px solid #ddd; | |
| 49 padding: 5px; | |
| 50 } | |
| 51 | |
| 52 table th, | 191 table th, |
| 53 table td { | 192 table td { |
| 54 padding: 10px; | 193 border: 1px solid rgb(217, 217, 217); |
| 55 text-align: center; | 194 padding: 7px; |
| 56 } | 195 } |
| 57 | 196 |
| 58 table th { | 197 table th { |
| 59 font-size: 14px; | 198 background-color: rgb(240, 240, 240); |
| 60 letter-spacing: 1px; | 199 font-weight: normal; |
| 61 text-transform: uppercase; | 200 } |
| 62 } | 201 |
| 63 | 202 table .removed { |
| 64 @media screen and (max-width: 600px) { | 203 background-color: #BDBDBD; |
| 65 table { | 204 } |
| 66 border: 0; | 205 |
| 67 } | 206 @media screen and (max-width: 600px) { |
| 68 table thead { | 207 table thead { |
| 69 display: none; | 208 display: none; |
| 70 } | 209 } |
| 71 table tr { | 210 |
| 72 border-bottom: 2px solid #ddd; | 211 table td { |
| 73 display: block; | 212 display: block; |
| 74 } | |
| 75 table td { | |
| 76 border-bottom: 1px dotted #ccc; | |
| 77 display: block; | |
| 78 font-size: 13px; | |
| 79 text-align: right; | 213 text-align: right; |
| 80 } | 214 } |
| 81 table td:last-child { | 215 |
| 82 border-bottom: 0; | |
| 83 } | |
| 84 table td::before { | 216 table td::before { |
| 85 content: attr(data-label); | 217 content: attr(data-label); |
| 86 float: left; | 218 float: left; |
| 87 font-weight: bold; | 219 font-weight: bold; |
| 88 text-transform: uppercase; | 220 } |
| 89 } | 221 } |
| 90 } | |
| 91 | |
| 92 /* Device Row */ | |
| 93 table .removed { | |
| 94 background-color: #BDBDBD; | |
| 95 } | |
| OLD | NEW |