Chromium Code Reviews| 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-dialog-behavior/p aper-dialog-behavior.html"> | |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog-behavior/p aper-dialog-shared-styles.html"> | |
| 6 <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"> |
| 7 | 5 |
| 8 <dom-module id="cr-dialog"> | 6 <dom-module id="cr-dialog"> |
| 9 <template> | 7 <template> |
| 10 <style include="paper-dialog-shared-styles"> | 8 <style> |
| 11 :host { | |
| 12 border-radius: 2px; | |
| 13 } | |
| 14 | |
| 15 :host ::content > * { | |
| 16 /* Overrides paper-dialog-shared-styles. */ | |
| 17 -webkit-padding-end: 0; | |
| 18 -webkit-padding-start: 0; | |
| 19 margin-bottom: 0; | |
| 20 margin-top: 0; | |
| 21 } | |
| 22 | |
| 23 .title-container { | 9 .title-container { |
| 24 align-items: center; | 10 align-items: center; |
| 25 /* TODO(dbeam): should this be a --settings-separator-line? */ | 11 /* TODO(dbeam): should this be a --settings-separator-line? */ |
| 26 border-bottom: 1px solid rgba(0, 0, 0, 0.14); | 12 border-bottom: 1px solid rgba(0, 0, 0, 0.14); |
| 27 display: flex; | 13 display: flex; |
| 28 min-height: 52px; | 14 min-height: 52px; |
| 29 } | 15 } |
| 30 | 16 |
| 31 :host ::content .title { | 17 :host ::content .title { |
| 32 font-size: 114.28%; /* (16px / 14px) * 100 */ | 18 font-size: 123.07%; /* (16px / 13px) * 100 */ |
| 33 } | 19 } |
| 34 | 20 |
| 35 #close { | 21 #close { |
| 36 --paper-icon-button: { | 22 --paper-icon-button: { |
| 37 height: 40px; | 23 height: 40px; |
| 38 width: 40px; | 24 width: 40px; |
| 39 }; | 25 }; |
| 40 -webkit-margin-end: 6px; | 26 -webkit-margin-end: 6px; |
| 41 /* <paper-icon-button> overrides --iron-icon-{height,width}, so this | 27 /* <paper-icon-button> overrides --iron-icon-{height,width}, so this |
| 42 * padding essentially reduces 40x40 to 20x20. */ | 28 * padding essentially reduces 40x40 to 20x20. */ |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 56 margin: 12px 0; | 42 margin: 12px 0; |
| 57 } | 43 } |
| 58 | 44 |
| 59 :host ::content .body, | 45 :host ::content .body, |
| 60 :host ::content .title { | 46 :host ::content .title { |
| 61 -webkit-padding-end: 24px; | 47 -webkit-padding-end: 24px; |
| 62 -webkit-padding-start: 24px; | 48 -webkit-padding-start: 24px; |
| 63 flex: 1; | 49 flex: 1; |
| 64 } | 50 } |
| 65 | 51 |
| 66 :host ::content .body, | |
| 67 :host ::content .footer, | |
| 68 :host ::content paper-button { | |
| 69 font-size: 92.86%; /* (13px / 14px) * 100 */ | |
| 70 } | |
| 71 | |
| 72 :host ::content .button-container { | 52 :host ::content .button-container { |
| 73 -webkit-padding-end: 16px; | 53 -webkit-padding-end: 16px; |
| 74 -webkit-padding-start: 16px; | 54 -webkit-padding-start: 16px; |
| 75 display: flex; | 55 display: flex; |
| 76 justify-content: flex-end; | 56 justify-content: flex-end; |
| 77 margin-bottom: 12px; | 57 margin-bottom: 12px; |
| 78 margin-top: 12px; | 58 margin-top: 12px; |
| 79 } | 59 } |
| 80 | 60 |
| 81 :host ::content .button-container .cancel-button { | 61 :host ::content .button-container .cancel-button { |
| 82 -webkit-margin-end: 8px; | 62 -webkit-margin-end: 8px; |
| 83 color: var(--paper-grey-600); | 63 color: var(--paper-grey-600); |
| 84 } | 64 } |
| 85 | 65 |
| 86 :host ::content .footer { | 66 :host ::content .footer { |
| 87 background-color: var(--paper-grey-200); | 67 background-color: var(--paper-grey-200); |
| 88 border-bottom-left-radius: inherit; | 68 border-bottom-left-radius: inherit; |
| 89 border-bottom-right-radius: inherit; | 69 border-bottom-right-radius: inherit; |
| 90 margin: 0; | 70 margin: 0; |
| 91 padding: 12px 20px; | 71 padding: 12px 20px; |
| 92 } | 72 } |
| 73 | |
| 74 :host { | |
| 75 border: 0; | |
| 76 border-radius: 2px; | |
| 77 bottom: 0; | |
| 78 color: inherit; | |
| 79 padding: 0; | |
| 80 top: 0; | |
| 81 } | |
| 82 | |
| 83 :host::backdrop { | |
| 84 background-color: rgba(0, 0, 0, 0.6); | |
| 85 bottom: 0; | |
| 86 left: 0; | |
| 87 position: fixed; | |
| 88 right: 0; | |
| 89 top: 0; | |
| 90 } | |
|
Dan Beam
2016/07/26 23:36:12
i would argue that these should go on the top of t
dpapad
2016/07/27 01:21:47
Done.
| |
| 93 </style> | 91 </style> |
| 94 <div class="title-container"> | 92 <div class="title-container"> |
| 95 <content select=".title"></content> | 93 <content select=".title"></content> |
| 96 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close"> | 94 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close"> |
| 97 </paper-icon-button> | 95 </paper-icon-button> |
| 98 </div> | 96 </div> |
| 99 <div class="body-container"> | 97 <div class="body-container"> |
| 100 <content select=".body"></content> | 98 <content select=".body"></content> |
| 101 </div> | 99 </div> |
| 102 <content select=".button-container"></content> | 100 <content select=".button-container"></content> |
| 103 <content select=".footer"></content> | 101 <content select=".footer"></content> |
| 104 </template> | 102 </template> |
| 105 <script src="cr_dialog.js"></script> | 103 <script src="cr_dialog.js"></script> |
| 106 </dom-module> | 104 </dom-module> |
| OLD | NEW |