Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="/settings_page/main_page_behavior.html"> | 1 <link rel="import" href="/settings_page/main_page_behavior.html"> |
| 2 | 2 |
| 3 <dom-module id="settings-page-styles"> | 3 <dom-module id="settings-page-styles"> |
| 4 <template> | 4 <template> |
| 5 <style include="main-page-styles"> | 5 <style include="main-page-styles"> |
| 6 :host { | 6 :host { |
| 7 --settings-page-padding-top: 21px; | 7 --settings-page-padding-top: 21px; |
| 8 box-sizing: border-box; | 8 box-sizing: border-box; |
| 9 display: block; | 9 display: block; |
| 10 height: inherit; | 10 height: inherit; |
| 11 margin: 0 auto; | 11 margin: 0 auto; |
| 12 max-width: 960px; | 12 max-width: 960px; |
| 13 min-width: 622px; | 13 min-width: 622px; |
| 14 position: relative; | 14 position: relative; |
| 15 width: 96%; | 15 width: 96%; |
| 16 } | 16 } |
| 17 | 17 |
| 18 :host > div { | 18 :host > div { |
| 19 height: inherit; | 19 height: inherit; |
| 20 } | 20 } |
| 21 | 21 |
| 22 :host > div > * { | 22 :host > div > * { |
| 23 /* The margin and padding here are doing two things: make the total | 23 /* The margin and padding here are doing two things: make the total |
| 24 * separation 24px; and make scrollIntoView align the section header | 24 * separation 24px; and make scrollIntoView align the section header |
| 25 * with the top item in the side nav menu. Both things are desired | 25 * with the top item in the side nav menu. Both things are desired |
| 26 * by Alan (bettes@). */ | 26 * by Alan (bettes@). */ |
| 27 margin-bottom: 3px; | 27 margin-bottom: 3px; |
| 28 padding-top: var(--settings-page-padding-top); | 28 /* TODO(michaelpg): This makes more sense as padding, but uses margin as |
| 29 * a workaround for crbug.com/617287. Because margins collapse, add 3px | |
| 30 * to retain mostly the same spacing. */ | |
| 31 margin-top: calc(var(--settings-page-padding-top) + 3px); | |
| 32 } | |
| 33 | |
| 34 :host > div > :first-of-type { | |
| 35 /* TODO(michaelpg): This is offset because of the previous addition of | |
| 36 * 3px. */ | |
|
dschuyler
2016/06/08 01:04:41
Let's include the bug number at
each point of cha
michaelpg
2016/06/09 18:31:30
Done.
| |
| 37 margin-top: var(--settings-page-padding-top); | |
| 29 } | 38 } |
| 30 | 39 |
| 31 .expanded.frozen { | 40 .expanded.frozen { |
| 32 margin-top: -var(--settings-page-padding-top); | 41 /* TODO(michaelpg): This is zeroed out because of the previous |
| 42 * replacement of margin with padding, above. */ | |
|
dschuyler
2016/06/08 01:04:41
* replacement of margin with padding, above. crbug
michaelpg
2016/06/09 18:31:30
Done.
| |
| 43 margin-top: 0; /* -var(--settings-page-padding-top); */ | |
| 33 } | 44 } |
| 34 </style> | 45 </style> |
| 35 </template> | 46 </template> |
| 36 </dom-module> | 47 </dom-module> |
| OLD | NEW |