| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 @license | |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | |
| 7 Code distributed by Google as part of the polymer project is also | |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | |
| 9 --><html><head><link rel="import" href="../polymer/polymer.html"> | |
| 10 <link rel="import" href="../paper-ripple/paper-ripple.html"> | |
| 11 <link rel="import" href="../paper-styles/default-theme.html"> | |
| 12 <link rel="import" href="../paper-behaviors/paper-radio-button-behavior.html"> | |
| 13 | |
| 14 <!-- | |
| 15 | |
| 16 `paper-checkbox` is a button that can be either checked or unchecked. User | |
| 17 can tap the checkbox to check or uncheck it. Usually you use checkboxes | |
| 18 to allow user to select multiple options from a set. If you have a single | |
| 19 ON/OFF option, avoid using a single checkbox and use `paper-toggle-button` | |
| 20 instead. | |
| 21 | |
| 22 Example: | |
| 23 | |
| 24 <paper-checkbox>label</paper-checkbox> | |
| 25 | |
| 26 <paper-checkbox checked> label</paper-checkbox> | |
| 27 | |
| 28 ### Styling | |
| 29 | |
| 30 The following custom properties and mixins are available for styling: | |
| 31 | |
| 32 Custom property | Description | Default | |
| 33 ----------------|-------------|---------- | |
| 34 `--paper-checkbox-unchecked-color` | Checkbox color when the input is not checke
d | `--primary-text-color` | |
| 35 `--paper-checkbox-unchecked-ink-color` | Selected/focus ripple color when the in
put is not checked | `--primary-text-color` | |
| 36 `--paper-checkbox-checked-color` | Checkbox color when the input is checked | `-
-default-primary-color` | |
| 37 `--paper-checkbox-checked-ink-color` | Selected/focus ripple color when the inpu
t is checked | `--default-primary-color` | |
| 38 `--paper-checkbox-label-color` | Label color | `--primary-text-color` | |
| 39 | |
| 40 @demo demo/index.html | |
| 41 --> | |
| 42 | |
| 43 <style is="custom-style"> | |
| 44 :root { | |
| 45 --paper-checkbox-unchecked-color: var(--primary-text-color); | |
| 46 --paper-checkbox-unchecked-ink-color: var(--primary-text-color); | |
| 47 | |
| 48 --paper-checkbox-checked-color: var(--default-primary-color); | |
| 49 --paper-checkbox-checked-ink-color: var(--default-primary-color); | |
| 50 | |
| 51 --paper-checkbox-label-color: var(--primary-text-color); | |
| 52 } | |
| 53 </style> | |
| 54 | |
| 55 </head><body><dom-module id="paper-checkbox"> | |
| 56 <link rel="import" type="css" href="paper-checkbox.css"> | |
| 57 | |
| 58 <template> | |
| 59 | |
| 60 <div id="checkboxContainer"> | |
| 61 <paper-ripple id="ink" class="circle" center="" checked$="[[checked]]"></p
aper-ripple> | |
| 62 <div id="checkbox" class$="[[_computeCheckboxClass(checked)]]"> | |
| 63 <div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div> | |
| 64 </div> | |
| 65 </div> | |
| 66 | |
| 67 <div id="checkboxLabel" aria-hidden="true"><content></content></div> | |
| 68 | |
| 69 </template> | |
| 70 | |
| 71 </dom-module> | |
| 72 <script src="paper-checkbox-extracted.js"></script></body></html> | |
| OLD | NEW |