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

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: fix border Created 4 years, 6 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; 13 max-width: 800px;
14 min-height: 120px; 14 min-width: 512px;
15 } 15 }
16 16
17 .dialog-content { 17 :host(:not(.fully-rendered)) {
18 visibility: hidden;
19 }
20
21 :host ::content > * {
22 /* Overrides paper-dialog-shared-styles. */
18 -webkit-padding-end: 0; 23 -webkit-padding-end: 0;
19 -webkit-padding-start: 0; 24 -webkit-padding-start: 0;
20 margin-bottom: 0; 25 margin-bottom: 0;
21 margin-top: 0; 26 margin-top: 0;
22 } 27 }
23 28
24 .footer-container { 29 .title-container {
25 margin: 0;
26 padding: 0;
27 }
28
29 .top-row {
30 align-items: center; 30 align-items: center;
31 /* TODO(dbeam): should this be a --settings-separator-line? */
31 border-bottom: 1px solid rgba(0, 0, 0, 0.14); 32 border-bottom: 1px solid rgba(0, 0, 0, 0.14);
32 display: flex; 33 display: flex;
33 min-height: 52px; 34 min-height: 52px;
34 } 35 }
35 36
36 paper-icon-button { 37 :host ::content .title {
38 -webkit-padding-end: 24px;
39 -webkit-padding-start: 24px;
40 flex: 1;
41 font-size: 114.28%; /* (16px / 14px) * 100 */
42 }
43
44 #close {
37 height: 20px; 45 height: 20px;
38 margin: 16px; 46 margin: 16px;
39 padding: 0; 47 padding: 0;
40 width: 20px; 48 width: 20px;
41 } 49 }
42 50
43 :host { 51 .body-container {
44 border-radius: 2px; 52 display: flex;
45 max-width: 800px; 53 flex-direction: column;
46 min-width: 512px; 54 min-width: 100%;
55 /* TODO(dbeam): use <paper-dialog-scrollable> to get dividers? */
47 overflow: auto; 56 overflow: auto;
48 } 57 }
49 58
59 :host ::content .body {
60 -webkit-padding-end: 24px;
61 -webkit-padding-start: 24px;
62 flex: 1;
dpapad 2016/05/25 01:32:28 Nit: Can we group common parts together? :host ::
Dan Beam 2016/05/25 02:07:49 Done.
63 margin: 12px 0;
64 }
65
50 :host ::content .body, 66 :host ::content .body,
51 :host ::content .footer, 67 :host ::content .footer,
52 :host ::content paper-button { 68 :host ::content paper-button {
53 font-size: 92.86%; /* (13px / 14px) * 100 */ 69 font-size: 92.86%; /* (13px / 14px) * 100 */
54 } 70 }
55 71
56 :host ::content .body {
57 margin: 12px 0 24px 0;
58 }
59
60 :host ::content .button-container { 72 :host ::content .button-container {
61 -webkit-padding-end: 16px; 73 -webkit-padding-end: 16px;
62 -webkit-padding-start: 16px; 74 -webkit-padding-start: 16px;
63 display: flex; 75 display: flex;
64 justify-content: flex-end; 76 justify-content: flex-end;
65 margin-bottom: 12px; 77 margin-bottom: 12px;
78 margin-top: 12px;
66 } 79 }
67 80
68 :host ::content .button-container .cancel-button { 81 :host ::content .button-container .cancel-button {
69 -webkit-margin-end: 8px; 82 -webkit-margin-end: 8px;
70 color: var(--paper-grey-600); 83 color: var(--paper-grey-600);
71 } 84 }
72 85
73 :host ::content .footer { 86 :host ::content .footer {
74 background-color: var(--paper-grey-200); 87 background-color: var(--paper-grey-200);
88 border-bottom-left-radius: inherit;
89 border-bottom-right-radius: inherit;
75 margin: 0; 90 margin: 0;
76 padding: 20px; 91 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 } 92 }
99 </style> 93 </style>
100 <div class="dialog-content"> 94 <div class="title-container">
101 <div class="top-row"> 95 <content select=".title"></content>
102 <content select=".title"></content> 96 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close">
103 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close"> 97 </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> 98 </div>
111 <div class="footer-container"> 99 <div class="body-container">
112 <content select=".footer"></content> 100 <content select=".body"></content>
113 </div> 101 </div>
102 <content select=".button-container"></content>
103 <content select=".footer"></content>
114 </template> 104 </template>
115 <script src="settings_dialog.js"></script> 105 <script src="settings_dialog.js"></script>
116 </dom-module> 106 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698