OLD | NEW |
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
mation-runner-behavior.html"> | |
3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm
l"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm
l"> |
| 3 <link rel="import" href="/animation/animation.html"> |
4 | 4 |
5 <dom-module id="settings-section"> | 5 <dom-module id="settings-section"> |
6 <template> | 6 <template> |
7 <style> | 7 <style> |
8 :host { | 8 :host { |
9 display: flex; | 9 display: flex; |
10 flex-direction: column; | 10 flex-direction: column; |
| 11 /* Margin so the box-shadow isn't clipped during animations. */ |
| 12 margin-left: 3px; |
| 13 margin-right: 3px; |
11 position: relative; | 14 position: relative; |
12 } | 15 } |
13 | 16 |
14 #header { | 17 #header { |
15 margin-bottom: 12px; | 18 margin-bottom: 12px; |
16 } | 19 } |
17 | 20 |
18 #header .title { | 21 #header .title { |
19 color: var(--paper-grey-600); | 22 color: var(--paper-grey-600); |
20 font-size: 13px; | 23 font-size: 13px; |
21 font-weight: 500; | 24 font-weight: 500; |
22 margin-top: var(--settings-page-vertical-margin); | 25 margin-top: var(--settings-page-vertical-margin); |
23 } | 26 } |
24 | 27 |
25 #card { | 28 #card { |
26 @apply(--shadow-elevation-2dp); | 29 @apply(--shadow-elevation-2dp); |
27 background-color: white; | 30 background-color: white; |
28 flex: 1; | 31 flex: 1; |
29 overflow: hidden; | 32 overflow: hidden; |
30 } | 33 } |
31 | 34 |
| 35 :host(.expanding) #card, |
| 36 :host(.collapsing) #card, |
| 37 :host(.expanded) #card { |
| 38 @apply(--shadow-elevation-4dp); |
| 39 } |
| 40 |
32 :host(.expanded) #header { | 41 :host(.expanded) #header { |
33 display: none; | 42 display: none; |
34 } | 43 } |
35 | |
36 :host(.frozen) #card { | |
37 position: fixed; | |
38 width: 100%; | |
39 } | |
40 | |
41 :host(.expanded.frozen) #card { | |
42 position: relative; | |
43 } | |
44 </style> | 44 </style> |
45 <div id="header"> | 45 <div id="header"> |
46 <div class="title">{{pageTitle}}</div> | 46 <div class="title">{{pageTitle}}</div> |
47 </div> | 47 </div> |
48 <div id="card"> | 48 <div id="card"> |
49 <content id="content"></content> | 49 <content id="content"></content> |
50 </div> | 50 </div> |
51 </template> | 51 </template> |
52 <script src="settings_section.js"></script> | 52 <script src="settings_section.js"></script> |
53 </dom-module> | 53 </dom-module> |
OLD | NEW |