Skip to content

Core-drawer-panel hardcoded drawer width #659

Description

@imanzano

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.
        *
-- 

Activity

  1. imanzano commented on Jul 27, 2014

    @imanzano
    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

  2. frankiefu commented on Jul 29, 2014

    @frankiefu
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions