From 12e1cc27183ee0c769d84e9c79b5af16f5bc866f Mon Sep 17 00:00:00 2001 From: frankiefu Date: Tue, 29 Jul 2014 10:00:14 -0700 Subject: [PATCH] add `drawerWidth` property to allow setting drawer width --- core-drawer-panel.css | 4 ---- core-drawer-panel.html | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/core-drawer-panel.css b/core-drawer-panel.css index e81b1c9..62cf44b 100644 --- a/core-drawer-panel.css +++ b/core-drawer-panel.css @@ -21,8 +21,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN position: absolute; top: 0; left: 0; - /* FIXME(ffu): remove hard-coded drawer panel width */ - width: 256px; height: 100%; box-sizing: border-box; -mox-box-sizing: border-box; @@ -62,7 +60,6 @@ polyfill-next-selector { content: ':host [drawer]'; } top: 0; right: 0; bottom: 0; - left: 256px; } .transition #main { @@ -71,7 +68,6 @@ polyfill-next-selector { content: ':host [drawer]'; } .right-drawer #main { left: 0; - right: 256px; } .right-drawer.transition #main { diff --git a/core-drawer-panel.html b/core-drawer-panel.html index 611f768..ce9fb90 100644 --- a/core-drawer-panel.html +++ b/core-drawer-panel.html @@ -65,12 +65,12 @@ -
+
-
+
@@ -89,6 +89,16 @@ */ publish: { + + /** + * Width of the drawer panel. + * + * @attribute drawerWidth + * @type string + * @default '256px' + */ + drawerWidth: '256px', + /** * Max-width when the panel changes to narrow layout. *