Skip to content

Commit 572f85e

Browse files
authored
Merge pull request #136 from PolymerElements/polish
Today's component-page polish.
2 parents c41b50a + dccae56 commit 572f85e

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

iron-component-page.html

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<link rel="import" href="../app-layout/app-drawer-layout/app-drawer-layout.html">
1313
<link rel="import" href="../app-layout/app-drawer/app-drawer.html">
1414
<link rel="import" href="../app-layout/app-header-layout/app-header-layout.html">
15+
<link rel="import" href="../app-layout/app-header/app-header.html">
1516
<link rel="import" href="../app-layout/app-toolbar/app-toolbar.html">
1617
<link rel="import" href="../iron-ajax/iron-ajax.html">
1718
<link rel="import" href="../iron-doc-viewer/default-theme.html">
@@ -26,6 +27,10 @@
2627
<dom-module id="iron-component-page">
2728
<template>
2829
<style include="iron-doc-default-theme">
30+
:host {
31+
--app-drawer-width: 300px;
32+
}
33+
2934
[hidden] {
3035
display: none;
3136
}
@@ -56,21 +61,8 @@
5661
overflow-x: hidden;
5762
}
5863

59-
/**
60-
* iron-doc-viewer uses scrollIntoView for fragment links, but this
61-
* doesn't take into account our app-header, so by default when our
62-
* scroll block is the document, we'll scroll things hidden underneath
63-
* the app-header.
64-
*/
65-
#scroller {
66-
overflow-y: auto;
67-
height: calc(100vh - 64px);
68-
display: flex;
69-
}
70-
7164
iron-doc-viewer {
72-
flex-grow: 1;
73-
65+
height: 100%;
7466
--iron-doc-title: {
7567
display: none;
7668
}
@@ -109,7 +101,7 @@
109101
</iron-doc-nav>
110102
</app-drawer>
111103

112-
<app-header-layout>
104+
<app-header-layout has-scrolling-region>
113105
<app-header slot="header" fixed>
114106
<app-toolbar>
115107
<paper-icon-button
@@ -122,16 +114,14 @@
122114
</app-toolbar>
123115
</app-header>
124116

125-
<div id="scroller">
126-
<iron-doc-viewer
127-
id="viewer"
128-
descriptor="[[_descriptor]]"
129-
base-href="[[baseHref]]"
130-
demo-src-prefix="[[demoSrcPrefix]]"
131-
title="{{_title}}"
132-
path="{{_path}}">
133-
</iron-doc-viewer>
134-
</div>
117+
<iron-doc-viewer
118+
id="viewer"
119+
descriptor="[[_descriptor]]"
120+
base-href="[[baseHref]]"
121+
demo-src-prefix="[[demoSrcPrefix]]"
122+
title="{{_title}}"
123+
path="{{_path}}">
124+
</iron-doc-viewer>
135125

136126
</app-header-layout>
137127
</app-drawer-layout>

0 commit comments

Comments
 (0)