• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2@license
3Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7Code distributed by Google as part of the polymer project is also
8subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9-->
10
11<link rel="import" href="../../polymer/polymer.html">
12
13<dom-module id="x-scrollable-element">
14  <template>
15    <style>
16      :host {
17        display: block;
18        height: 100px;
19        border: 1px solid red;
20        overflow: auto;
21      }
22      #ChildOne, #ChildTwo {
23        height: 200px;
24        border: 1px solid blue;
25        overflow: auto;
26      }
27      #GrandchildOne, #GrandchildTwo {
28        height: 300px;
29        border: 1px solid green;
30        overflow: auto;
31      }
32      .scrollContent {
33        height: 400px;
34        background-color: yellow;
35      }
36    </style>
37    <div id="ChildOne">
38      <div id="GrandchildOne">
39        <div class="scrollContent"></div>
40      </div>
41    </div>
42    <div id="ChildTwo">
43      <div id="GrandchildTwo">
44        <div class="scrollContent"></div>
45      </div>
46    </div>
47  </template>
48  <script>
49    Polymer({
50      is: 'x-scrollable-element'
51    });
52  </script>
53</dom-module>
54