PolymerElements / iron-pages

Simple content switcher
https://www.webcomponents.org/element/PolymerElements/iron-pages
48 stars 19 forks source link

Use css containment on iron-pages #46

Closed TimvdLippe closed 6 years ago

TimvdLippe commented 7 years ago

Description

This is mostly inspired by the latest supercharged. Since we know beforehand that only 1 view is selected by iron-pages, it would be nice to take advantage of css containment just like explained in the video.

I have made the change locally and tried to debug potential issues and measure the performance improvement. Sadly the improvement seems random and only working with contain: strict; which results in a stylistic breaking change on the demo page. At this moment I am not familiar enough with the specification to understand why it breaks existing code and what other non-breaking options there are. Maybe Surma or Paul could explain that.

TimvdLippe commented 6 years ago

This is probably a breaking change, let's not do this.