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

Unified Diff: polymer_0.5.0/bower_components/core-focusable/demo.html

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 12 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: polymer_0.5.0/bower_components/core-focusable/demo.html
diff --git a/polymer_0.5.0/bower_components/core-focusable/demo.html b/polymer_0.5.0/bower_components/core-focusable/demo.html
new file mode 100644
index 0000000000000000000000000000000000000000..70db68d1e2a2d163608f08cefbbce737fc112e88
--- /dev/null
+++ b/polymer_0.5.0/bower_components/core-focusable/demo.html
@@ -0,0 +1,109 @@
+<!doctype html>
+<!--
+Copyright 2013 The Polymer Authors. All rights reserved.
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file.
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
+
+ <title>core-focusable</title>
+
+ <script src="../webcomponentsjs/webcomponents.js"></script>
+
+ <link href="core-focusable.html" rel="import">
+
+ <style shim-shadowdom>
+ body {
+ font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
+ font-size: 14px;
+ margin: 0;
+ padding: 24px;
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
+ -webkit-touch-callout: none;
+ }
+
+ section {
+ padding: 20px 0;
+ }
+
+ section > div {
+ padding: 14px;
+ font-size: 16px;
+ }
+
+ focusable-button {
+ display: inline-block;
+ padding: 0.5em 1em;
+ border-radius: 3px;
+ outline: none;
+ }
+
+ focusable-button[disabled] {
+ background: #e0e0e0;
+ }
+
+ focusable-button[active] {
+ background: #000;
+ color: #fff;
+ }
+
+ focusable-button[pressed] {
+ background: #ffb74d;
+ color: #000;
+ }
+
+ focusable-button[focused] {
+ border: 1px solid #4fc3f7;
+ }
+
+ </style>
+</head>
+<body unresolved>
+
+ <polymer-element name="focusable-button" tabindex="0">
+ <script>
+ (function() {
+ var p = {
+
+ eventDelegates: {
+ down: 'downAction',
+ up: 'upAction'
+ },
+
+ downAction: function() {
+ // call overriden event delegate
+ this._downAction();
+ console.log('down');
+ },
+
+ upAction: function() {
+ // call overriden event delegate
+ this._upAction();
+ console.log('up');
+ }
+
+ };
+
+ Polymer.mixin2(p, Polymer.CoreFocusable);
+ Polymer(p);
+ })();
+ </script>
+ </polymer-element>
+
+ <section>
+
+ <focusable-button>button</focusable-button>
+
+ <focusable-button toggle>toggle</focusable-button>
+
+ <focusable-button disabled>disabled</focusable-button>
+
+ </section>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698