Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core-drawer-panel hardcoded drawer width #659

Closed
imanzano opened this issue Jul 26, 2014 · 2 comments
Closed

Core-drawer-panel hardcoded drawer width #659

imanzano opened this issue Jul 26, 2014 · 2 comments

Comments

@imanzano
Copy link

The width of the core-drawer-panel is hardcoded.

I did the following tentative fix.

--- a/core-drawer-panel.css
+++ b/core-drawer-panel.css
@@ -20,9 +20,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
 #drawer {
   position: absolute;
   top: 0;
-  left: 0;
-  /* FIXME(ffu): remove hard-coded drawer panel width */
-  width: 256px;
+  left: 0;  
   height: 100%;
   box-sizing: border-box;
   -mox-box-sizing: border-box;
diff --git a/core-drawer-panel.html b/core-drawer-panel.html
index 611f768..f1990c0 100644
--- a/core-drawer-panel.html
+++ b/core-drawer-panel.html
@@ -70,7 +70,7 @@ To position the drawer to the right, add `rightDrawer` attribute.
       <div id="scrim" on-tap="{{togglePanel}}"></div>
     </div>

-    <div id="drawer">
+    <div id="drawer" style="width: {{drawerWidth}}">
       <content select="[drawer]"></content>
     </div>

@@ -99,6 +99,14 @@ To position the drawer to the right, add `rightDrawer` attribute.
       responsiveWidth: '640px',

       /**
+      * Width for the drawer panel.
+      * @attribute drawerWidth
+      * @type string
+      * @default '256px'
+      */
+      drawerWidth: '256px',
+
+      /**
        * The panel that is being selected. `drawer` for the drawer panel and
        * `main` for the main panel.
        *
-- 
@imanzano
Copy link
Author

Hi,

My patch is incomplete. If you full screen the browser in order to toggle the drawer open, I found some hardcoded 256px in the css too. So, the drawer appears over the main content.

I will fixed it and upload a new tentative fix.

thanks
Ignacio

@frankiefu
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants