I have an app-drawer-layout
element and in it, I want the drawer content (blue) flush with the main content (yellow) with no gap (white) in between them. Note that I changed the --app-drawer-width
to 100px
from its default 256px
. This might be what is causing the gap. Is this a bug? Or am I coding it wrong?
Here is the JSBin. Note: When viewing the demo, make sure the output pane is slid wide enough to make the drawer visible. If the output pane is too narrow, the drawer will be hidden.
app-drawer-layout http://jsbin.com/lulenamavo/edit?html,output<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<base href="http://polygit.org/polymer+:master/components/">
<link rel="import" href="polymer/polymer-element.html">
<link rel="import" href="app-layout/app-layout.html">
</head>
<body>
<dom-module id="my-el">
<template>
<style>
app-drawer {
--app-drawer-width: 100px;
--app-drawer-content-container: {
background-color: blue;
color: white;
}
}
#main-content {
background-color: yellow;
height: 100vh;
width: 100vw; /* doesn't make content sections flush */
}
</style>
<app-drawer-layout fullbleed>
<app-drawer slot="drawer">
drawer content
</app-drawer>
<div id="main-content">
main content
</div>
</app-drawer-layout>
</template>
<script>
class MyEl extends Polymer.Element {
static get is() {
return 'my-el'
}
}
customElements.define(MyEl.is, MyEl);
</script>
</dom-module>
<my-el></my-el>
</body>
</html>