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

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

Issue 2106013002: Move settings-section animations into setting-section, make better (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Transitions
Patch Set: Refactor 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">
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698