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

Unified Diff: third_party/polymer/v0_8/components-chromium/paper-checkbox/paper-checkbox.html

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove polymer/explainer Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v0_8/components-chromium/paper-checkbox/paper-checkbox.html
diff --git a/third_party/polymer/v0_8/components-chromium/paper-checkbox/paper-checkbox.html b/third_party/polymer/v0_8/components-chromium/paper-checkbox/paper-checkbox.html
new file mode 100644
index 0000000000000000000000000000000000000000..dd346b5b7166a4d86e3b4131657b575f70f82506
--- /dev/null
+++ b/third_party/polymer/v0_8/components-chromium/paper-checkbox/paper-checkbox.html
@@ -0,0 +1,72 @@
+<!--
+@license
+Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+--><html><head><link rel="import" href="../polymer/polymer.html">
+<link rel="import" href="../paper-ripple/paper-ripple.html">
+<link rel="import" href="../paper-styles/default-theme.html">
+
+<!--
+`paper-checkbox` is a button that can be either checked or unchecked. User
+can tap the checkbox to check or uncheck it. Usually you use checkboxes
+to allow user to select multiple options from a set. If you have a single
+ON/OFF option, avoid using a single checkbox and use `paper-toggle-button`
+instead.
+
+Example:
+
+ <paper-checkbox>label</paper-checkbox>
+
+ <paper-checkbox checked> label</paper-checkbox>
+
+Styling a checkbox:
+
+<style is="x-style">
+ * {
+ /* Unhecked state colors. */
+ --paper-checkbox-unchecked-color: #5a5a5a;
+ --paper-checkbox-unchecked-ink-color: #5a5a5a;
+
+ /* Checked state colors. */
+ --paper-checkbox-checked-color: #009688;
+ --paper-checkbox-checked-ink-color: #009688;
+ }
+</style>
+
+@group Paper Elements
+@class paper-checkbox
+-->
+
+</head><body>/* TODO: This needs to use core-focusable when it's ready. */
+<dom-module id="paper-checkbox">
+ <style is="x-style">
+ * {
+ --paper-checkbox-unchecked-color: var(--primary-text-color);
+ --paper-checkbox-unchecked-ink-color: var(--primary-text-color);
+
+ --paper-checkbox-checked-color: var(--default-primary-color);
+ --paper-checkbox-checked-ink-color: var(--default-primary-color);
+ }
+ </style>
+
+ <link rel="import" type="css" href="paper-checkbox.css">
+
+ <template>
+
+ <div id="checkboxContainer">
+ <paper-ripple id="ink" class="circle" recenters="" checked$="[[checked]]"></paper-ripple>
+ <div id="checkbox" class$="[[_computeCheckboxClass(checked)]]">
+ <div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div>
+ </div>
+ </div>
+
+ <div id="checkboxLabel" aria-hidden="true"><content></content></div>
+
+ </template>
+</dom-module>
+
+<script src="paper-checkbox-extracted.js"></script></body></html>

Powered by Google App Engine
This is Rietveld 408576698