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

Side by Side Diff: ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html

Issue 2795763003: MD Settings: adjust dialog style and scroll border visual (Closed)
Patch Set: explicitly assert intersection entries max length Created 3 years, 8 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/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 {
(...skipping 12 matching lines...) Expand all
23 background-color: rgba(0, 0, 0, 0.6); 23 background-color: rgba(0, 0, 0, 0.6);
24 bottom: 0; 24 bottom: 0;
25 left: 0; 25 left: 0;
26 position: fixed; 26 position: fixed;
27 right: 0; 27 right: 0;
28 top: 0; 28 top: 0;
29 } 29 }
30 30
31 .top-container { 31 .top-container {
32 align-items: center; 32 align-items: center;
33 border-bottom: 1px solid var(--divider-color);
34 display: flex; 33 display: flex;
35 min-height: 52px; 34 min-height: 47px;
36 } 35 }
37 36
38 .title-container { 37 .title-container {
39 display: flex; 38 display: flex;
40 flex: 1; 39 flex: 1;
41 outline: none; 40 outline: none;
42 } 41 }
43 42
44 :host ::content .title { 43 :host ::content .title {
45 font-size: 123.07%; /* (16px / 13px) * 100 */ 44 font-size: 115.38%; /* (15px / 13px) * 100 */
45 line-height: 1;
46 margin-bottom: 16px;
47 margin-top: 16px;
dschuyler 2017/04/06 22:29:13 nit: margin: 16px 0; can replace lines 46 and 47.
scottchen 2017/04/06 22:36:01 Done.
46 } 48 }
47 49
48 #close { 50 #close {
49 --paper-icon-button: { 51 --paper-icon-button: {
50 height: 40px; 52 height: 36px;
51 width: 40px; 53 width: 36px;
52 }; 54 };
53 -webkit-margin-end: 6px; 55
56 --layout-inline: {
57 display: flex;
58 };
59
60 -webkit-margin-end: 4px;
54 /* <paper-icon-button> overrides --iron-icon-{height,width}, so this 61 /* <paper-icon-button> overrides --iron-icon-{height,width}, so this
55 * padding essentially reduces 40x40 to 20x20. */ 62 * padding essentially reduces 40x40 to 20x20. */
56 padding: 10px; 63 padding: 10px;
57 } 64 }
58 65
59 .body-container { 66 .body-container {
60 display: flex; 67 display: flex;
61 flex-direction: column; 68 flex-direction: column;
62 overflow: auto; 69 overflow: auto;
63 @apply(--cr-dialog-body-container); 70 @apply(--cr-dialog-body-container);
64 } 71 }
65 72
66 :host([show-scroll-borders]) .body-container { 73 :host([show-scroll-borders]) .body-container {
67 /* Prevent layout moving when border does appear. */ 74 /* Prevent layout moving when border does appear. */
68 border-bottom: 1px solid transparent; 75 border-bottom: 1px solid transparent;
76 border-top: 1px solid transparent;
69 } 77 }
70 78
71 :host([show-scroll-borders]) .body-container.bottom-scrollable { 79 :host([show-scroll-borders]) .body-container.bottom-scrollable {
72 border-bottom: 1px solid var(--paper-grey-300); 80 border-bottom: 1px solid var(--paper-grey-300);
73 } 81 }
74 82
83 :host([show-scroll-borders]) .body-container.top-scrollable {
84 border-top: 1px solid var(--paper-grey-300);
85 }
86
75 :host ::content .body { 87 :host ::content .body {
76 padding-bottom: 12px; 88 padding-bottom: 12px;
77 padding-top: 12px; 89 padding-top: 12px;
78 } 90 }
79 91
80 :host ::content .body, 92 :host ::content .body,
81 :host ::content .title { 93 :host ::content .title {
82 -webkit-padding-end: 24px; 94 padding: 0 16px;
83 -webkit-padding-start: 24px;
84 flex: 1; 95 flex: 1;
85 } 96 }
86 97
87 :host ::content .button-container { 98 :host ::content .button-container {
88 -webkit-padding-end: 16px; 99 padding: 0 16px;
89 -webkit-padding-start: 16px;
90 display: flex; 100 display: flex;
91 justify-content: flex-end; 101 justify-content: flex-end;
92 margin-bottom: 12px; 102 margin-bottom: 16px;
93 margin-top: 12px; 103 margin-top: 16px;
dschuyler 2017/04/06 22:29:13 margin: 16px 0;
scottchen 2017/04/06 22:36:01 Done.
94 } 104 }
95 105
96 :host ::content .button-container .cancel-button { 106 :host ::content .button-container .cancel-button {
97 -webkit-margin-end: 8px; 107 -webkit-margin-end: 8px;
98 color: var(--paper-grey-600); 108 color: var(--paper-grey-600);
99 } 109 }
100 110
101 :host ::content .footer { 111 :host ::content .footer {
102 border-bottom-left-radius: inherit; 112 border-bottom-left-radius: inherit;
103 border-bottom-right-radius: inherit; 113 border-bottom-right-radius: inherit;
104 margin: 0; 114 margin: 0;
105 padding: 16px 20px; 115 padding: 16px 20px;
106 } 116 }
107 117
108 :host ::content .border-top-divider { 118 :host ::content .border-top-divider {
109 border-top: 1px solid var(--divider-color); 119 border-top: 1px solid var(--divider-color);
110 } 120 }
111 </style> 121 </style>
112 <div class="top-container"> 122 <div class="top-container">
113 <div class="title-container" tabindex="-1"> 123 <div class="title-container" tabindex="-1">
114 <content select=".title"></content> 124 <content select=".title"></content>
115 </div> 125 </div>
116 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close" 126 <paper-icon-button icon="cr:clear" on-tap="cancel" id="close"
117 aria-label$="[[closeText]]"> 127 aria-label$="[[closeText]]">
118 </paper-icon-button> 128 </paper-icon-button>
119 </div> 129 </div>
120 <div class="body-container"> 130 <div class="body-container">
131 <span id="bodyTopMarker"></span>
121 <content select=".body"></content> 132 <content select=".body"></content>
122 <span id="bodyBottomMarker"></span> 133 <span id="bodyBottomMarker"></span>
123 </div> 134 </div>
124 <content select=".button-container"></content> 135 <content select=".button-container"></content>
125 <content select=".footer"></content> 136 <content select=".footer"></content>
126 </template> 137 </template>
127 <script src="cr_dialog.js"></script> 138 <script src="cr_dialog.js"></script>
128 </dom-module> 139 </dom-module>
OLDNEW
« no previous file with comments | « chrome/test/data/webui/cr_elements/cr_dialog_test.js ('k') | ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698