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; | |
8 padding: 0; | |
9 } | |
10 | |
11 body { | 7 body { |
12 margin: 0; | 8 margin: 0; |
13 padding: 0; | 9 padding: 0; |
14 } | 10 } |
15 | 11 |
16 | 12 h1 { |
17 /* Header bar */ | 13 color: rgb(92, 97, 102); |
18 | |
19 header { | |
20 align-items: center; | |
21 background-color: rgb(33, 150, 243); | |
22 display: flex; | |
23 flex-direction: row; | |
24 font-size: 20pt; | |
25 height: 56px; | |
26 justify-content: flex-start; | |
27 padding: 0 16px; | |
28 } | 14 } |
29 | 15 |
30 .title { | 16 /* Page container */ |
31 color: white; | 17 #page-container { |
32 display: inline-block; | 18 margin-left: 155px; |
dpapad
2016/12/07 19:33:20
Have you this UI in RTL? These should be -webkit-m
mbrunson
2016/12/07 21:15:56
Added -webkit-margin-start, -webkit-border-start,
dpapad
2016/12/07 21:34:23
I run it as follows
LANGUAGE=ar ./out/<your_out_fo
| |
33 margin-left: 8px; | |
34 } | 19 } |
35 | 20 |
21 @media screen and (max-width: 600px) { | |
22 #page-container { | |
23 margin-left: 0; | |
24 } | |
25 } | |
26 | |
27 /* Page content */ | |
28 #page-container section { | |
29 padding: 24px 16px; | |
30 } | |
31 | |
32 /* Page header */ | |
33 .page-header { | |
34 align-items: center; | |
35 background-color: white; | |
36 border-bottom: 1px solid #eee; | |
37 display: flex; | |
38 height: 48px; | |
39 padding-top: 8px; | |
40 position: sticky; | |
dpapad
2016/12/07 19:33:20
Interesting!
mbrunson
2016/12/07 21:15:56
And convenient! :D
Looks like it was just enabled
| |
41 top: 0; | |
42 } | |
43 | |
44 .page-header > h1 { | |
45 margin: 13px 0; | |
46 } | |
47 | |
48 #menu-btn { | |
49 background-color: transparent; | |
50 background-image: url(../../../../ui/webui/resources/images/menu.svg); | |
51 background-position: center; | |
52 background-repeat: no-repeat; | |
53 border: 0; | |
54 display: none; | |
55 height: 48px; | |
56 margin: 0; | |
57 width: 48px; | |
58 } | |
59 | |
60 @media screen and (max-width: 600px) { | |
61 #menu-btn { | |
62 display: block; | |
63 } | |
64 | |
65 .page-header > h1 { | |
66 margin: 13px 0 13px 24px; | |
67 } | |
68 } | |
69 | |
70 /* Sidebar */ | |
71 #sidebar { | |
72 bottom: 0; | |
73 left: 0; | |
74 position: fixed; | |
75 right: 0; | |
76 top: 0; | |
77 transition: visibility 200ms cubic-bezier(.4, 0, .6, 1); | |
78 width: 155px; | |
79 } | |
80 | |
81 @media screen and (max-width: 600px) { | |
82 #sidebar { | |
83 width: auto; | |
84 visibility: hidden; | |
85 } | |
86 | |
87 #sidebar.open { | |
88 visibility: visible; | |
89 } | |
90 } | |
91 | |
92 /* Sidebar Contents */ | |
93 .sidebar-content { | |
94 background-color: white; | |
95 height: 100%; | |
96 transition-timing-function: cubic-bezier(.4, 0, .6, 1); | |
97 width: 155px; | |
98 } | |
99 | |
100 .sidebar-content > header > h1 { | |
101 margin: 0; | |
102 padding: 21px 0 18px 23px; | |
103 } | |
104 | |
105 .sidebar-content ul { | |
106 list-style-type: none; | |
107 padding: 0; | |
108 } | |
109 | |
110 .sidebar-content button { | |
111 background-color: transparent; | |
112 border: 0; | |
113 color: #999; | |
114 cursor: pointer; | |
115 font: inherit; | |
116 height: 40px; | |
117 padding: 0 0 0 16px; | |
118 text-align: left; | |
119 width: 100%; | |
120 } | |
121 | |
122 .sidebar-content .selected button { | |
123 border-left: 6px solid rgb(78, 87, 100); | |
124 color: rgb(70, 78, 90); | |
125 padding: 0 0 0 10px; | |
126 } | |
127 | |
128 .sidebar-content button:hover { | |
129 background-color: #E0E0E0; | |
130 } | |
131 | |
132 .overlay { | |
133 background-color: rgba(0, 0, 0, .5); | |
134 bottom: 0; | |
135 left: 0; | |
136 opacity: 0; | |
137 position: absolute; | |
138 right: 0; | |
139 top: 0; | |
140 transition: visibility 225ms, opacity 225ms cubic-bezier(.4, 0, .6, 1); | |
141 visibility: hidden; | |
142 } | |
143 | |
144 @media screen and (max-width: 600px) { | |
145 .sidebar-content { | |
146 transform: translate3d(-155px, 0, 0); | |
147 transition: transform 195ms; | |
148 } | |
149 | |
150 .open .sidebar-content { | |
151 transform: translate3d(0, 0, 0); | |
152 transition: transform 195ms; | |
dpapad
2016/12/07 19:33:20
Could you use CSS vars where possible to avoid rep
mbrunson
2016/12/07 21:15:56
Oh. That's so convenient! I wish I knew this exist
| |
153 } | |
154 | |
155 .open .overlay { | |
156 opacity: 1; | |
157 visibility: visible; | |
158 } | |
159 } | |
36 | 160 |
37 /* Device table */ | 161 /* Device table */ |
38 | |
39 table { | 162 table { |
40 border: 1px solid #ccc; | |
41 border-collapse: collapse; | 163 border-collapse: collapse; |
42 margin: 0; | 164 margin: 0; |
43 padding: 0; | 165 padding: 0; |
44 width: 100%; | 166 width: 100%; |
45 } | 167 } |
46 | 168 |
47 table tr { | |
48 border: 1px solid #ddd; | |
49 padding: 5px; | |
50 } | |
51 | |
52 table th, | 169 table th, |
53 table td { | 170 table td { |
54 padding: 10px; | 171 border: 1px solid rgb(217, 217, 217); |
55 text-align: center; | 172 padding: 7px; |
56 } | 173 } |
57 | 174 |
58 table th { | 175 table th { |
59 font-size: 14px; | 176 background-color: rgb(240, 240, 240); |
60 letter-spacing: 1px; | 177 font-weight: normal; |
61 text-transform: uppercase; | 178 } |
179 | |
180 table .removed { | |
181 background-color: #BDBDBD; | |
62 } | 182 } |
63 | 183 |
64 @media screen and (max-width: 600px) { | 184 @media screen and (max-width: 600px) { |
65 table { | |
66 border: 0; | |
67 } | |
68 table thead { | 185 table thead { |
69 display: none; | 186 display: none; |
70 } | 187 } |
71 table tr { | 188 |
72 border-bottom: 2px solid #ddd; | 189 table td { |
73 display: block; | 190 display: block; |
74 } | |
75 table td { | |
76 border-bottom: 1px dotted #ccc; | |
77 display: block; | |
78 font-size: 13px; | |
79 text-align: right; | 191 text-align: right; |
80 } | 192 } |
81 table td:last-child { | 193 |
82 border-bottom: 0; | |
83 } | |
84 table td::before { | 194 table td::before { |
85 content: attr(data-label); | 195 content: attr(data-label); |
86 float: left; | 196 float: left; |
87 font-weight: bold; | 197 font-weight: bold; |
88 text-transform: uppercase; | |
89 } | 198 } |
90 } | 199 } |
91 | |
92 /* Device Row */ | |
93 table .removed { | |
94 background-color: #BDBDBD; | |
95 } | |
OLD | NEW |