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

Unified Diff: polymer_0.5.0/bower_components/core-dropdown-menu/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-dropdown-menu/demo.html
diff --git a/polymer_0.5.0/bower_components/core-dropdown-menu/demo.html b/polymer_0.5.0/bower_components/core-dropdown-menu/demo.html
new file mode 100644
index 0000000000000000000000000000000000000000..f2646e5bf809fdc6950153f27055786884b0c3d7
--- /dev/null
+++ b/polymer_0.5.0/bower_components/core-dropdown-menu/demo.html
@@ -0,0 +1,191 @@
+<!doctype html>
+<!--
+Copyright (c) 2014 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>
+
+ <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.0, user-scalable=yes">
+
+ <title>core-dropdown-menu</title>
+
+ <script src="../webcomponentsjs/webcomponents.js"></script>
+
+ <link href="../core-collapse/core-collapse.html" rel="import">
+ <link href="../core-dropdown/core-dropdown.html" rel="import">
+ <link href="../core-icons/core-icons.html" rel="import">
+ <link href="../core-icon-button/core-icon-button.html" rel="import">
+ <link href="../core-item/core-item.html" rel="import">
+ <link href="../core-menu/core-menu.html" rel="import">
+
+ <link href="core-dropdown-menu.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;
+ }
+
+ html /deep/ core-dropdown-menu {
+ box-sizing: border-box;
+ width: 170px;
+ }
+
+ html /deep/ core-dropdown {
+ box-sizing: border-box;
+ min-width: 170px;
+ background-color: #eee;
+ color: #000;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ }
+
+ core-item {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ html /deep/ core-collapse {
+ border: 1px solid #ccc;
+ padding: 8px;
+ }
+
+ .constrained-height {
+ height: 150px;
+ }
+
+ .colored {
+ border: 1px solid #0f9d58;
+ background-color: #b7e1cd;
+ color: #0f9d58;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <template is="auto-binding">
+
+ <section>
+
+ <div>Absolutely positioned dropdowns</div>
+
+ <core-dropdown-menu label="Your favorite pastry">
+ <core-dropdown class="dropdown">
+ <core-menu>
+ <template repeat="{{pastries}}">
+ <core-item>{{}}</core-item>
+ </template>
+ </core-menu>
+ </core-dropdown>
+ </core-dropdown-menu>
+
+ <br><br>
+
+ <core-dropdown-menu label="Disabled" disabled>
+ <core-dropdown class="dropdown">
+ <core-menu>
+ <core-item>Should not see this</core-item>
+ </core-menu>
+ </core-dropdown>
+ </core-dropdown-menu>
+
+ </section>
+
+ <section>
+
+ <div>Layered dropdowns</div>
+
+ <button onclick="document.getElementById('collapse').toggle()">toggle core-collapse</button>
+
+ <br>
+
+ <core-collapse id="collapse">
+
+ <core-dropdown-menu label="Your favorite pastry">
+ <core-dropdown layered class="dropdown">
+ <core-menu>
+ <template repeat="{{pastries}}">
+ <core-item>{{}}</core-item>
+ </template>
+ </core-menu>
+ </core-dropdown>
+ </core-dropdown-menu>
+
+ </core-collapse>
+
+ </section>
+
+ <section>
+
+ <div>Custom styling</div>
+
+ <core-dropdown-menu label="Constrained height">
+ <core-dropdown class="dropdown constrained-height">
+ <core-menu>
+ <template repeat="{{pastries}}">
+ <core-item>{{}}</core-item>
+ </template>
+ </core-menu>
+ </core-dropdown>
+ </core-dropdown-menu>
+
+ <br><br>
+
+ <core-dropdown-menu label="Colored">
+ <core-dropdown class="dropdown colored">
+ <core-menu>
+ <template repeat="{{pastries}}">
+ <core-item>{{}}</core-item>
+ </template>
+ </core-menu>
+ </core-dropdown>
+ </core-dropdown-menu>
+
+ </section>
+
+ </template>
+
+ <script>
+
+ scope = document.querySelector('template[is=auto-binding]');
+
+ scope.pastries = [
+ 'Apple fritter',
+ 'Croissant',
+ 'Donut',
+ 'Financier',
+ 'Jello',
+ 'Madeleine',
+ 'Pound cake',
+ 'Pretzel',
+ 'Sfogliatelle'
+ ];
+
+ </script>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698