Skip to content

Commit 194e7f5

Browse files
authored
Merge pull request #142 from PolymerElements/301
Fixes for webcomponents.org
2 parents c1e1679 + 7875978 commit 194e7f5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

iron-component-page.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
}
7171
}
7272

73+
iron-doc-viewer:not([demo]) {
74+
padding: 5px 20px 20px 20px;
75+
max-width: 56em;
76+
}
77+
7378
#error-toast {
7479
background-color: var(--paper-red-600);
7580
}
@@ -123,7 +128,8 @@
123128
base-href="[[baseHref]]"
124129
demo-src-prefix="[[demoSrcPrefix]]"
125130
title="{{_title}}"
126-
path="{{_path}}">
131+
path="{{_path}}"
132+
on-view-changed="_onViewChanged">
127133
</iron-doc-viewer>
128134

129135
</app-header-layout>
@@ -186,6 +192,10 @@
186192
}
187193
},
188194

195+
_onViewChanged() {
196+
this.$.viewer.scrollIntoView();
197+
},
198+
189199
_onNavSelect() {
190200
// Note we need to listen for this event, and can't rely just on the
191201
// path changing, because the user might click on the nav item they

0 commit comments

Comments
 (0)