| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/assert.html"> | 2 <link rel="import" href="chrome://resources/html/assert.html"> |
| 3 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/default-th
eme.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/default-th
eme.html"> |
| 6 | 6 |
| 7 <dom-module id="cr-dialog"> | 7 <dom-module id="cr-dialog"> |
| 8 <template> | 8 <template> |
| 9 <style> | 9 <style> |
| 10 :host { | 10 :host { |
| 11 --scroll-border: 1px solid var(--paper-grey-300); | 11 --scroll-border: 1px solid var(--paper-grey-300); |
| 12 border: 0; | 12 border: 0; |
| 13 border-radius: 2px; | 13 border-radius: 2px; |
| 14 bottom: 0; | 14 bottom: 0; |
| 15 box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.12), | 15 box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.12), |
| 16 0px 16px 16px rgba(0, 0, 0, 0.24); | 16 0px 16px 16px rgba(0, 0, 0, 0.24); |
| 17 color: inherit; | 17 color: inherit; |
| 18 padding: 0; | 18 padding: 0; |
| 19 top: 0; | 19 top: 0; |
| 20 width: 512px; | 20 width: 512px; |
| 21 } | 21 } |
| 22 | 22 |
| 23 :host([open]) { |
| 24 /* Keep max-height within viewport, and flex content accordingly. */ |
| 25 display: flex; |
| 26 flex-direction: column; |
| 27 max-height: 100vh; |
| 28 } |
| 29 |
| 30 /* When needing to flex, force .body-container alone to shrink. */ |
| 31 .top-container, |
| 32 :host ::content .button-container, |
| 33 :host ::content .footer { |
| 34 flex-shrink: 0; |
| 35 } |
| 36 |
| 23 :host::backdrop { | 37 :host::backdrop { |
| 24 background-color: rgba(0, 0, 0, 0.6); | 38 background-color: rgba(0, 0, 0, 0.6); |
| 25 bottom: 0; | 39 bottom: 0; |
| 26 left: 0; | 40 left: 0; |
| 27 position: fixed; | 41 position: fixed; |
| 28 right: 0; | 42 right: 0; |
| 29 top: 0; | 43 top: 0; |
| 30 } | 44 } |
| 31 | 45 |
| 32 :host([show-scroll-borders]) .body-container { | 46 :host([show-scroll-borders]) .body-container { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 padding: 16px 20px; | 86 padding: 16px 20px; |
| 73 } | 87 } |
| 74 | 88 |
| 75 :host ::content .border-top-divider { | 89 :host ::content .border-top-divider { |
| 76 border-top: 1px solid var(--divider-color); | 90 border-top: 1px solid var(--divider-color); |
| 77 } | 91 } |
| 78 | 92 |
| 79 .body-container { | 93 .body-container { |
| 80 display: flex; | 94 display: flex; |
| 81 flex-direction: column; | 95 flex-direction: column; |
| 96 min-height: 60px; /* Minimum reasonably usable height. */ |
| 82 overflow: auto; | 97 overflow: auto; |
| 83 @apply(--cr-dialog-body-container); | 98 @apply(--cr-dialog-body-container); |
| 84 } | 99 } |
| 85 | 100 |
| 86 .top-container { | 101 .top-container { |
| 87 align-items: flex-start; | 102 align-items: flex-start; |
| 88 display: flex; | 103 display: flex; |
| 89 min-height: 47px; | 104 min-height: 47px; |
| 90 } | 105 } |
| 91 | 106 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 121 <div class="body-container"> | 136 <div class="body-container"> |
| 122 <span id="bodyTopMarker"></span> | 137 <span id="bodyTopMarker"></span> |
| 123 <content select=".body"></content> | 138 <content select=".body"></content> |
| 124 <span id="bodyBottomMarker"></span> | 139 <span id="bodyBottomMarker"></span> |
| 125 </div> | 140 </div> |
| 126 <content select=".button-container"></content> | 141 <content select=".button-container"></content> |
| 127 <content select=".footer"></content> | 142 <content select=".footer"></content> |
| 128 </template> | 143 </template> |
| 129 <script src="cr_dialog.js"></script> | 144 <script src="cr_dialog.js"></script> |
| 130 </dom-module> | 145 </dom-module> |
| OLD | NEW |