Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: chrome/browser/resources/settings/settings_dialog.html

Issue 1974193002: MD Settings: fix overflow scrolling for <settings-dialog> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-polish3
Patch Set: unhack Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog-behavior/p aper-dialog-behavior.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog-behavior/p aper-dialog-behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog-behavior/p aper-dialog-shared-styles.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog-behavior/p aper-dialog-shared-styles.html">
5 <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-icon-button/paper -icon-button.html">
6 6
7 <dom-module id="settings-dialog"> 7 <dom-module id="settings-dialog">
8 <template> 8 <template>
9 <style include="paper-dialog-shared-styles"></style> 9 <style include="paper-dialog-shared-styles"></style>
10 <style> 10 <style>
11 .body-content { 11 :host {
12 display: flex; 12 border-radius: 2px;
13 flex-direction: column;
14 min-height: 120px;
15 } 13 }
16 14
17 .dialog-content { 15 :host ::content > * {
16 /* Overrides paper-dialog-shared-styles. */
18 -webkit-padding-end: 0; 17 -webkit-padding-end: 0;
19 -webkit-padding-start: 0; 18 -webkit-padding-start: 0;
20 margin-bottom: 0; 19 margin-bottom: 0;
21 margin-top: 0; 20 margin-top: 0;
22 } 21 }
23 22
24 .footer-container { 23 .title-container {
25 margin: 0;
26 padding: 0;
27 }
28
29 .top-row {
30 align-items: center; 24 align-items: center;
25 /* TODO(dbeam): should this be a --settings-separator-line? */
31 border-bottom: 1px solid rgba(0, 0, 0, 0.14); 26 border-bottom: 1px solid rgba(0, 0, 0, 0.14);
32 display: flex; 27 display: flex;
33 min-height: 52px; 28 min-height: 52px;
34 } 29 }
35 30
36 paper-icon-button { 31 :host ::content .title {
32 font-size: 114.28%; /* (16px / 14px) * 100 */
33 }
34
35 #close {
37 height: 20px; 36 height: 20px;
38 margin: 16px; 37 margin: 16px;
39 padding: 0; 38 padding: 0;
40 width: 20px; 39 width: 20px;
41 } 40 }
42 41
43 :host { 42 .body-container {
44 border-radius: 2px; 43 display: flex;
44 flex-direction: column;
45 max-width: 800px; 45 max-width: 800px;
46 min-width: 512px; 46 min-width: 512px;
47 /* TODO(dbeam): use <paper-dialog-scrollable> to get dividers? */
47 overflow: auto; 48 overflow: auto;
48 } 49 }
49 50
51 :host ::content .body {
52 margin: 12px 0;
53 }
54
55 :host ::content .body,
56 :host ::content .title {
57 -webkit-padding-end: 24px;
58 -webkit-padding-start: 24px;
59 flex: 1;
60 }
61
50 :host ::content .body, 62 :host ::content .body,
51 :host ::content .footer, 63 :host ::content .footer,
52 :host ::content paper-button { 64 :host ::content paper-button {
53 font-size: 92.86%; /* (13px / 14px) * 100 */ 65 font-size: 92.86%; /* (13px / 14px) * 100 */
54 } 66 }
55 67
56 :host ::content .body {
57 margin: 12px 0 24px 0;
58 }
59
60 :host ::content .button-container { 68 :host ::content .button-container {
61 -webkit-padding-end: 16px; 69 -webkit-padding-end: 16px;
62 -webkit-padding-start: 16px; 70 -webkit-padding-start: 16px;
63 display: flex; 71 display: flex;
64 justify-content: flex-end; 72 justify-content: flex-end;
65 margin-bottom: 12px; 73 margin-bottom: 12px;
74 margin-top: 12px;
66 } 75 }
67 76
68 :host ::content .button-container .cancel-button { 77 :host ::content .button-container .cancel-button {
69 -webkit-margin-end: 8px; 78 -webkit-margin-end: 8px;
70 color: var(--paper-grey-600); 79 color: var(--paper-grey-600);
71 } 80 }
72 81
73 :host ::content .footer { 82 :host ::content .footer {
74 background-color: var(--paper-grey-200); 83 background-color: var(--paper-grey-200);
84 border-bottom-left-radius: inherit;
85 border-bottom-right-radius: inherit;
75 margin: 0; 86 margin: 0;
76 padding: 20px; 87 padding: 12px 20px;
77 }
78
79 :host ::content .row {
80 align-items: center;
81 display: flex;
82 min-height: 40px;
83 }
84
85 :host ::content .row .start {
86 flex: 1;
87 }
88
89 :host ::content .title {
90 font-size: 114.28%; /* (16px / 14px) * 100 */
91 }
92
93 :host ::content .body,
94 :host ::content .title {
95 -webkit-padding-end: 24px;
96 -webkit-padding-start: 24px;
97 flex: 1;
98 } 88 }
99 </style> 89 </style>
100 <div class="dialog-content"> 90 <div class="title-container">
101 <div class="top-row"> 91 <content select=".title"></content>
102 <content select=".title"></content> 92 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close">
103 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close"> 93 </paper-icon-button>
104 </paper-icon-button>
105 </div>
106 <div class="body-content">
107 <content select=".body"></content>
108 <content select=".button-container"></content>
109 </div>
110 </div> 94 </div>
111 <div class="footer-container"> 95 <div class="body-container">
112 <content select=".footer"></content> 96 <content select=".body"></content>
113 </div> 97 </div>
98 <content select=".button-container"></content>
99 <content select=".footer"></content>
114 </template> 100 </template>
115 <script src="settings_dialog.js"></script> 101 <script src="settings_dialog.js"></script>
116 </dom-module> 102 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698