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

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

Issue 2829373003: [MD settings] change spacing between controlledBy icon and control (Closed)
Patch Set: 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/shared_style_css.html"> 1 <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
2 <link rel="import" href="settings_vars_css.html"> 2 <link rel="import" href="settings_vars_css.html">
3 3
4 <!-- Common styles for Material Design settings. --> 4 <!-- Common styles for Material Design settings. -->
5 <dom-module id="settings-shared"> 5 <dom-module id="settings-shared">
6 <template> 6 <template>
7 <style include="cr-shared-style"> 7 <style include="cr-shared-style">
8 /* Included here so we don't have to include "iron-positioning" in every 8 /* Included here so we don't have to include "iron-positioning" in every
9 * stylesheet. See crbug.com/498405. */ 9 * stylesheet. See crbug.com/498405. */
10 [hidden] { 10 [hidden] {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 margin: 0; 46 margin: 0;
47 } 47 }
48 48
49 paper-button[toggles][active] { 49 paper-button[toggles][active] {
50 background-color: var(--paper-grey-300); 50 background-color: var(--paper-grey-300);
51 } 51 }
52 52
53 paper-toggle-button { 53 paper-toggle-button {
54 @apply(--settings-actionable); 54 @apply(--settings-actionable);
55 height: var(--settings-row-min-height); 55 height: var(--settings-row-min-height);
56 width: 31px; 56 width: 36px;
57 } 57 }
58 58
59 span ~ a { 59 span ~ a {
60 -webkit-margin-start: 4px; 60 -webkit-margin-start: 4px;
61 } 61 }
62 62
63 .primary-button, 63 .primary-button,
64 a[href] { 64 a[href] {
65 color: var(--google-blue-700); 65 color: var(--google-blue-700);
66 } 66 }
67 67
68 .primary-button { 68 .primary-button {
69 --paper-button-flat-keyboard-focus: { 69 --paper-button-flat-keyboard-focus: {
70 background: rgba(51, 103, 214, .12); /* --google-blue-700 */ 70 background: rgba(51, 103, 214, .12); /* --google-blue-700 */
71 }; 71 };
72 } 72 }
73 73
74 a[href] { 74 a[href] {
75 text-decoration: none; 75 text-decoration: none;
76 } 76 }
77 77
78 /* There are three main button styles, .primary-button and 78 /* There are three main button styles, .primary-button and
79 * .secondary-button. The primary is the action button (e.g. "edit", 79 * .secondary-button. The primary is the action button (e.g. "edit",
80 * "delete") while the secondary is often a "Cancel" button. A tertiary 80 * "delete") while the secondary is often a "Cancel" button. A tertiary
81 * button may be used to get more information or similar, that we expect 81 * button may be used to get more information or similar, that we expect
82 * most users will not need. */ 82 * most users will not need. */
83 .primary-button { 83 .primary-button {
84 --paper-button: { 84 --paper-button: {
85 -webkit-padding-end: var(--settings-button-padding);
86 -webkit-padding-start: var(--settings-button-padding);
85 font-weight: 500; 87 font-weight: 500;
86 text-align: start; 88 text-align: start;
87 }; 89 };
88 } 90 }
89 91
90 .primary-toggle { 92 .primary-toggle {
91 color: var(--paper-grey-600); 93 color: var(--paper-grey-600);
92 font-weight: 500; 94 font-weight: 500;
93 } 95 }
94 96
95 .primary-toggle[checked] { 97 .primary-toggle[checked] {
96 color: var(--google-blue-500); 98 color: var(--google-blue-500);
97 } 99 }
98 100
99 /* See notes in .primary-button. */ 101 /* See notes in .primary-button. */
100 .secondary-button { 102 .secondary-button {
101 --paper-button: { 103 --paper-button: {
104 -webkit-padding-end: var(--settings-button-padding);
105 -webkit-padding-start: var(--settings-button-padding);
102 color: var(--paper-grey-600); 106 color: var(--paper-grey-600);
103 font-weight: 500; 107 font-weight: 500;
104 min-width: 1em; /* A tighter fit than 5.14em for short buttons. */ 108 min-width: 1em; /* A tighter fit than 5.14em for short buttons. */
105 text-decoration: none; 109 text-decoration: none;
106 }; 110 };
107 --paper-button-flat-keyboard-focus: { 111 --paper-button-flat-keyboard-focus: {
108 background: rgba(0, 0, 0, .12); 112 background: rgba(0, 0, 0, .12);
109 }; 113 };
110 } 114 }
111 115
112 .settings-box .primary-button, 116 .settings-box .primary-button,
113 .settings-box .secondary-button,
114 .settings-box .secondary-button { 117 .settings-box .secondary-button {
115 -webkit-margin-end: -12px; 118 -webkit-margin-end: calc(var(--settings-button-padding) * -1);
116 -webkit-margin-start: -12px; 119 -webkit-margin-start: calc(var(--settings-button-padding) * -1);
117 -webkit-padding-end: 12px;
118 -webkit-padding-start: 12px;
119 } 120 }
120 121
121 paper-checkbox { 122 paper-checkbox {
122 --paper-checkbox-checked-color: var(--google-blue-500); 123 --paper-checkbox-checked-color: var(--google-blue-500);
123 --paper-checkbox-label-spacing: var(--settings-control-spacing); 124 --paper-checkbox-label-spacing: var(--settings-control-spacing);
124 --paper-checkbox-size: var(--checkbox-size); 125 --paper-checkbox-size: var(--checkbox-size);
125 --paper-checkbox-unchecked-color: var(--paper-grey-600); 126 --paper-checkbox-unchecked-color: var(--paper-grey-600);
126 -webkit-margin-start: var(--checkbox-margin-start); 127 -webkit-margin-start: var(--checkbox-margin-start);
127 } 128 }
128 129
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 /* The secondary-action wraps a clickable sub-area of a .settings-box. 322 /* The secondary-action wraps a clickable sub-area of a .settings-box.
322 * An example is the |sign out| button on the People settings. 323 * An example is the |sign out| button on the People settings.
323 * Here is an example with and without a secondary action box: 324 * Here is an example with and without a secondary action box:
324 * 325 *
325 * +-------------------------------------------------------+ 326 * +-------------------------------------------------------+
326 * | Main action area .settings-box | .secondary-action | 327 * | Main action area .settings-box | .secondary-action |
327 * +-------------------------------------------------------+ 328 * +-------------------------------------------------------+
328 * | Another setting-box without a secondary-action | 329 * | Another setting-box without a secondary-action |
329 * +-------------------------------------------------------+ */ 330 * +-------------------------------------------------------+ */
330 :-webkit-any(.settings-box, .list-item) .secondary-action { 331 :-webkit-any(.settings-box, .list-item) .secondary-action {
332 --cr-paper-icon-button-margin: {
333 -webkit-margin-end: 16px;
334 -webkit-margin-start: 16px;
335 }
336 --secondary-action-button-margin: 8px;
331 -webkit-border-start: var(--settings-separator-line); 337 -webkit-border-start: var(--settings-separator-line);
332 -webkit-margin-start: 20px; 338 -webkit-margin-end: calc(var(--settings-box-row-padding) * -1);
333 -webkit-padding-start: 20px; 339 -webkit-margin-start: var(--settings-box-row-padding);
334 align-items: center; 340 align-items: center;
335 display: flex; 341 display: flex;
336 flex-shrink: 0; 342 flex-shrink: 0;
337 height: 36px; 343 height: 36px;
338 } 344 }
339 345
340 :-webkit-any(.settings-box, .list-item).two-line .secondary-action { 346 :-webkit-any(.settings-box, .list-item).two-line .secondary-action {
341 height: 46px; 347 height: 46px;
342 } 348 }
343 349
350 :-webkit-any(.settings-box, .list-item) .secondary-action
351 :-webkit-any(.primary-button, .secondary-button) {
352 -webkit-margin-end: var(--secondary-action-button-margin);
353 -webkit-margin-start: var(--secondary-action-button-margin);
354 }
355
344 /* Helper for a list frame to automatically avoid the separator line. */ 356 /* Helper for a list frame to automatically avoid the separator line. */
345 .vertical-list > *:not(:first-of-type) { 357 .vertical-list > *:not(:first-of-type) {
346 border-top: var(--settings-separator-line); 358 border-top: var(--settings-separator-line);
347 } 359 }
348 360
349 .settings-checkbox-spacer { 361 .settings-checkbox-spacer {
350 -webkit-margin-start: calc( 362 -webkit-margin-start: calc(
351 var(--checkbox-margin-start) + 363 var(--checkbox-margin-start) +
352 var(--checkbox-size) + 364 var(--checkbox-size) +
353 var(--settings-control-spacing)); 365 var(--settings-control-spacing));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 transform: rotate(-135deg); 407 transform: rotate(-135deg);
396 } 408 }
397 409
398 .column-header { 410 .column-header {
399 color: var(--paper-grey-600); 411 color: var(--paper-grey-600);
400 font-weight: 500; 412 font-weight: 500;
401 } 413 }
402 </style> 414 </style>
403 </template> 415 </template>
404 </dom-module> 416 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698