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

Side by Side Diff: chrome/browser/resources/settings/controls/controlled_button.html

Issue 2829373003: [MD settings] change spacing between controlledBy icon and control (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_shared_css.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <link rel="import" href="chrome://resources/html/assert.html"> 1 <link rel="import" href="chrome://resources/html/assert.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-button/paper-butt on.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_be havior.html"> 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_be havior.html">
5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> 5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html">
6 <link rel="import" href="pref_control_behavior.html"> 6 <link rel="import" href="pref_control_behavior.html">
7 <link rel="import" href="../i18n_setup.html"> 7 <link rel="import" href="../i18n_setup.html">
8 <link rel="import" href="../settings_shared_css.html"> 8 <link rel="import" href="../settings_shared_css.html">
9 9
10 <dom-module id="controlled-button"> 10 <dom-module id="controlled-button">
11 <template> 11 <template>
12 <style include="settings-shared"> 12 <style include="settings-shared">
13 :host { 13 :host {
14 align-items: center; 14 align-items: center;
15 display: flex; 15 display: flex;
16 --justify-margin: 18px; 16 margin-left: var(--secondary-action-button-margin);
17 margin-right: var(--secondary-action-button-margin);
17 } 18 }
18 19
19 :host([enforced_]) { 20 :host([enforced_]) {
20 /* Disable pointer events for this whole element, as outer on-tap gets 21 /* Disable pointer events for this whole element, as outer on-tap gets
21 * triggered when clicking/tapping anywhere in :host. */ 22 * triggered when clicking/tapping anywhere in :host. */
22 pointer-events: none; 23 pointer-events: none;
23 } 24 }
24 25
25 cr-policy-pref-indicator { 26 cr-policy-pref-indicator {
26 /* Enable pointer events for the indicator so :hover works. Disable 27 /* Enable pointer events for the indicator so :hover works. Disable
27 * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */ 28 * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */
28 pointer-events: all; 29 pointer-events: all;
29 } 30 }
30 31
31 :host(:not([end-justified])) cr-policy-pref-indicator { 32 :host(:not([end-justified])) cr-policy-pref-indicator {
32 -webkit-margin-start: var(--justify-margin); 33 -webkit-margin-end: calc(
34 var(--cr-control-spacing) - var(--secondary-action-button-margin));
35 -webkit-margin-start: var(--cr-control-spacing);
33 } 36 }
34 37
35 :host([end-justified]) cr-policy-pref-indicator { 38 :host([end-justified]) cr-policy-pref-indicator {
36 -webkit-margin-end: var(--justify-margin); 39 -webkit-margin-end: var(--cr-control-spacing);
40 -webkit-margin-start:calc(
Dan Beam 2017/04/26 20:48:29 nit: space after :
41 var(--cr-control-spacing) - var(--secondary-action-button-margin));
37 order: -1; 42 order: -1;
38 } 43 }
39 </style> 44 </style>
40 45
41 <paper-button disabled="[[enforced_]]">[[label]]</paper-button> 46 <paper-button disabled="[[enforced_]]">[[label]]</paper-button>
42 47
43 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]" restamp> 48 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]" restamp>
44 <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_" 49 <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_"
45 icon-aria-label="[[label]]"> 50 icon-aria-label="[[label]]">
46 </cr-policy-pref-indicator> 51 </cr-policy-pref-indicator>
47 </template> 52 </template>
48 53
49 </template> 54 </template>
50 <script src="controlled_button.js"></script> 55 <script src="controlled_button.js"></script>
51 </dom-module> 56 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_shared_css.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698