私はapp-drawer-layout
要素を持っていますが、その中にメインコンテンツ(黄色)と引き出しコンテンツ(青色)が隙間なく(白く)なるようにしたいと考えています。 --app-drawer-width
を100px
からデフォルトの256px
に変更しました。これはギャップを引き起こしているものかもしれません。これはバグですか?それとも間違ってコーディングしていますか?Polymer 2.xのapp-drawer-layoutでドロワとメインコンテンツのギャップを閉じる方法は?
Here is the JSBin.注:デモを表示するときは、出力ペインが引き出しが見えるようにスライドされていることを確認してください。出力ペインが狭すぎると、引き出しが非表示になります。
アプリ-引き出しレイアウト 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>