From 560555ebfe20bf7fb779fb2114c101a1485521d9 Mon Sep 17 00:00:00 2001 From: "a.vashchenkov" Date: Tue, 15 Mar 2016 07:28:47 +0300 Subject: [PATCH] Adding ability to show menu button content and keep focus on it. It's needed to make dropdown menu with filter. --- demo/index.html | 19 +++++++++++++++++++ paper-menu-button.html | 27 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/demo/index.html b/demo/index.html index b0467fe..4f81b6e 100644 --- a/demo/index.html +++ b/demo/index.html @@ -148,6 +148,25 @@

Alternate Button

+
+
+

Alternate Button with visible content

+
+ + + + Dinosaurs + + + + + +
+
+
+

Alternate Content

diff --git a/paper-menu-button.html b/paper-menu-button.html index 19a7ab8..ba90cdc 100644 --- a/paper-menu-button.html +++ b/paper-menu-button.html @@ -91,6 +91,14 @@ margin-top: 20px; } + :host([vertical-align="top"][show-content]) paper-material { + margin-top: 43px; + } + + :host([vertical-align="bottom"][show-content]) paper-material { + margin-bottom: 43px; + } + iron-dropdown { @apply(--paper-menu-button-dropdown); } @@ -110,6 +118,7 @@