blob: 38ff819691caaee7f4b0af8d77c2a43c541d91e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.html">
<link rel="import" href="/animation/animation.html">
<dom-module id="settings-section">
<template>
<style>
:host {
display: flex;
flex-direction: column;
/* Margin so the box-shadow isn't clipped during animations. */
margin-left: 3px;
margin-right: 3px;
position: relative;
}
#header {
margin-bottom: 12px;
}
#header .title {
color: var(--paper-grey-600);
font-size: 13px;
font-weight: 500;
margin-bottom: 0;
margin-top: var(--settings-page-vertical-margin);
}
#card {
@apply(--shadow-elevation-2dp);
background-color: white;
border-radius: 2px;
flex: 1;
}
:host(.expanded) #card {
border-radius: 0;
}
:host(.expanding) #card,
:host(.collapsing) #card,
:host(.expanded) #card {
@apply(--shadow-elevation-4dp);
overflow: hidden;
/* A stacking context constrains sliding sub-pages to the card. */
z-index: 0;
}
:host(:not(.expanding):not(.expanded)) #card {
/* Keep the fading-out neon-animatable inside the card. */
position: relative;
}
:host(.expanded) #header {
display: none;
}
:host([hidden-by-search]) {
display: none;
}
</style>
<div id="header">
<h2 class="title">{{pageTitle}}</h2>
</div>
<div id="card">
<content id="content"></content>
</div>
</template>
<script src="settings_section.js"></script>
</dom-module>
|