Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: chrome/browser/resources/settings/settings_page/settings_section.html

Issue 2230123002: MD Settings: fix collapse animation once and for all (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Overscroll2
Patch Set: for review Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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">
4 <link rel="import" href="/animation/animation.html"> 3 <link rel="import" href="/animation/animation.html">
5 4
6 <dom-module id="settings-section"> 5 <dom-module id="settings-section">
7 <template> 6 <template>
8 <style> 7 <style>
9 :host { 8 :host {
10 display: flex; 9 display: flex;
11 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;
12 position: relative; 14 position: relative;
13 } 15 }
14 16
15 #header { 17 #header {
16 margin-bottom: 12px; 18 margin-bottom: 12px;
17 } 19 }
18 20
19 #header .title { 21 #header .title {
20 color: var(--paper-grey-600); 22 color: var(--paper-grey-600);
21 font-size: 13px; 23 font-size: 13px;
22 font-weight: 500; 24 font-weight: 500;
23 margin-top: var(--settings-page-vertical-margin); 25 margin-top: var(--settings-page-vertical-margin);
24 } 26 }
25 27
26 #card { 28 #card {
27 @apply(--shadow-elevation-2dp); 29 @apply(--shadow-elevation-2dp);
28 background-color: white; 30 background-color: white;
29 flex: 1; 31 flex: 1;
30 overflow: hidden; 32 overflow: hidden;
31 } 33 }
32 34
35 :host(.expanding) #card,
36 :host(.collapsing) #card,
37 :host(.expanded) #card {
38 @apply(--shadow-elevation-4dp);
39 }
40
41 :host(:not(.expanding):not(.expanded)) #card {
42 /* Keep the fading-out neon-animatable inside the card. */
43 position: relative;
44 }
45
33 :host(.expanded) #header { 46 :host(.expanded) #header {
34 display: none; 47 display: none;
35 } 48 }
36 49
37 :host(.frozen) #card {
38 position: fixed;
39 width: 100%;
40 }
41
42 :host(.expanded.frozen) #card {
43 position: relative;
44 }
45
46 :host([hidden-by-search]) { 50 :host([hidden-by-search]) {
47 display: none; 51 display: none;
48 } 52 }
49 </style> 53 </style>
50 <div id="header"> 54 <div id="header">
51 <div class="title">{{pageTitle}}</div> 55 <div class="title">{{pageTitle}}</div>
52 </div> 56 </div>
53 <div id="card"> 57 <div id="card">
54 <content id="content"></content> 58 <content id="content"></content>
55 </div> 59 </div>
56 </template> 60 </template>
57 <script src="settings_section.js"></script> 61 <script src="settings_section.js"></script>
58 </dom-module> 62 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698