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 * @fileoverview | 6 * @fileoverview | 
| 7 * Common styles for Material Design settings. | 7 * Common styles for Material Design settings. | 
| 8 */ | 8 */ | 
| 9 | 9 | 
| 10 <dom-module id="settings-shared"> | 10 <dom-module id="settings-shared"> | 
| 11 <template> | 11 <template> | 
| 12 <style> | 12 <style> | 
| 13 :root { | 13 :root { | 
| 14 --checkbox-margin-start: 2px; | |
| 15 --checkbox-size: 16px; | |
| 16 --checkbox-spacing: 18px; | |
| 14 --settings-secondary: { | 17 --settings-secondary: { | 
| 15 color: var(--paper-grey-500); | 18 color: var(--paper-grey-500); | 
| 16 font-weight: 400; | 19 font-weight: 400; | 
| 17 } | 20 } | 
| 18 } | 21 } | 
| 19 | 22 | 
| 20 h2 { | 23 h2 { | 
| 21 @apply(--layout-center); | 24 @apply(--layout-center); | 
| 22 color: var(--paper-grey-500); | 25 color: var(--paper-grey-500); | 
| 23 display: flex; | 26 display: flex; | 
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 | 123 | 
| 121 .list-frame { | 124 .list-frame { | 
| 122 @apply(--layout-center); | 125 @apply(--layout-center); | 
| 123 -webkit-padding-end: 20px; | 126 -webkit-padding-end: 20px; | 
| 124 -webkit-padding-start: 48px; | 127 -webkit-padding-start: 48px; | 
| 125 display: block; | 128 display: block; | 
| 126 padding-bottom: 0; | 129 padding-bottom: 0; | 
| 127 padding-top: 0; | 130 padding-top: 0; | 
| 128 } | 131 } | 
| 129 | 132 | 
| 130 .list-frame select { | 133 .list-frame .secondary, | 
| 131 -webkit-margin-start: 4px; | 134 .list-item .secondary { | 
| 132 } | |
| 133 | |
| 134 .list-frame .secondary { | |
| 135 @apply(--settings-secondary); | 135 @apply(--settings-secondary); | 
| 136 } | 136 } | 
| 137 | 137 | 
| 138 .list-item { | 138 .list-item { | 
| 139 @apply(--layout-center); | 139 @apply(--layout-center); | 
| 140 display: flex; | 140 display: flex; | 
| 141 min-height: 40px; | 141 min-height: 40px; | 
| 142 padding: 0; | 142 padding: 0; | 
| 143 } | 143 } | 
| 144 | 144 | 
| 145 /* This button has no ink ripple */ | |
| 146 .list-item.list-button { | |
| 147 @apply(--layout-center); | |
| 148 color: var(--google-blue-500); | |
| 149 font-weight: 500; | |
| 150 } | |
| 151 | |
| 152 .list-item iron-icon { | 145 .list-item iron-icon { | 
| 153 @apply(--layout-center); | 146 @apply(--layout-center); | 
| 154 height: 20px; | 147 height: 20px; | 
| 155 width: 20px; | 148 width: 20px; | 
| 156 } | 149 } | 
| 157 | 150 | 
| 151 .list-item select { | |
| 152 -webkit-margin-start: 4px; | |
| 153 } | |
| 154 | |
| 158 .list-item > .middle { | 155 .list-item > .middle { | 
| 159 flex: 1; | 156 flex: 1; | 
| 160 margin: 8px 12px; | 157 margin: 8px 12px; | 
| 161 overflow: hidden; | 158 overflow: hidden; | 
| 162 white-space: nowrap; | 159 white-space: nowrap; | 
| 163 } | 160 } | 
| 164 | 161 | 
| 165 .list-item > .start { | 162 .list-item > .start { | 
| 166 flex: 1; | 163 flex: 1; | 
| 167 overflow: hidden; | 164 overflow: hidden; | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 padding: 8px; | 237 padding: 8px; | 
| 241 } | 238 } | 
| 242 | 239 | 
| 243 .vertical-list > div:first-of-type { | 240 .vertical-list > div:first-of-type { | 
| 244 border-top: none; | 241 border-top: none; | 
| 245 } | 242 } | 
| 246 | 243 | 
| 247 .vertical-list > div { | 244 .vertical-list > div { | 
| 248 border-top: 1px solid var(--paper-grey-300); | 245 border-top: 1px solid var(--paper-grey-300); | 
| 249 } | 246 } | 
| 247 | |
| 248 .settings-checkbox-spacer { | |
| 249 -webkit-margin-start: calc( | |
| 
 
michaelpg
2016/03/02 21:53:06
This, um, apparently works, both in native CSS in
 
Dan Beam
2016/03/02 22:04:32
yeah, i did something like this in downloads (but
 
 | |
| 250 var(--checkbox-margin-start) + | |
| 251 var(--checkbox-size) + | |
| 252 var(--checkbox-spacing)); | |
| 253 } | |
| 250 </style> | 254 </style> | 
| 251 </template> | 255 </template> | 
| 252 </dom-module> | 256 </dom-module> | 
| OLD | NEW |