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

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

Issue 2168383003: Hack to fix settings-checkbox mixin for 1.6.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Polymer160
Patch Set: no dependency Created 4 years, 5 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 | no next file » | 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/polymer.html"> 1 <link rel="import" href="chrome://resources/html/polymer.html">
2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html">
3 <link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.html "> 3 <link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.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="/controls/pref_control_behavior.html"> 6 <link rel="import" href="/controls/pref_control_behavior.html">
7 <link rel="import" href="/settings_shared_css.html"> 7 <link rel="import" href="/settings_shared_css.html">
8 8
9 <dom-module id="settings-checkbox"> 9 <dom-module id="settings-checkbox">
10 <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css" > 10 <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css" >
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 min-height: var(--settings-row-min-height); 16 min-height: var(--settings-row-min-height);
17 } 17 }
18 18
19 .secondary:not(:empty) { 19 .secondary:not(:empty) {
20 @apply(--settings-secondary); 20 @apply(--settings-secondary);
21 } 21 }
22 22
23 #nonexistent {
24 /* HACK(michaelpg): Inform Polymer that this mixin can set "display". */
25 --settings-secondary-unchecked: {
26 display: block;
27 };
28 }
29
23 paper-checkbox:not([checked]) .secondary { 30 paper-checkbox:not([checked]) .secondary {
24 @apply(--settings-secondary-unchecked); 31 @apply(--settings-secondary-unchecked);
25 } 32 }
26 33
27 cr-policy-pref-indicator { 34 cr-policy-pref-indicator {
28 -webkit-margin-start: var(--checkbox-spacing); 35 -webkit-margin-start: var(--checkbox-spacing);
29 } 36 }
30 </style> 37 </style>
31 <cr-events id="events"></cr-events> 38 <cr-events id="events"></cr-events>
32 39
33 <div class="layout horizontal center"> 40 <div class="layout horizontal center">
34 <paper-checkbox id="checkbox" checked="{{checked}}" 41 <paper-checkbox id="checkbox" checked="{{checked}}"
35 disabled="[[checkboxDisabled_(disabled, pref)]]"> 42 disabled="[[checkboxDisabled_(disabled, pref)]]">
36 <div>[[label]]</div> 43 <div>[[label]]</div>
37 <div class="secondary">[[subLabel]]</div> 44 <div class="secondary">[[subLabel]]</div>
38 </paper-checkbox> 45 </paper-checkbox>
39 <template is="dom-if" if="[[pref.policySource]]"> 46 <template is="dom-if" if="[[pref.policySource]]">
40 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> 47 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator>
41 </template> 48 </template>
42 </div> 49 </div>
43 </template> 50 </template>
44 <script src="settings_checkbox.js"></script> 51 <script src="settings_checkbox.js"></script>
45 </dom-module> 52 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698