-
Notifications
You must be signed in to change notification settings - Fork 100
/
v-accordion.css
117 lines (109 loc) · 3.34 KB
/
v-accordion.css
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* vAccordion - AngularJS multi-level accordion component
* @version v1.6.0
* @link http://lukaszwatroba.github.io/v-accordion
* @author Łukasz Wątroba <l@lukaszwatroba.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/***************************************
vAccordion
***************************************/
/**
* Example HTML:
*
<v-accordion class="vAccordion--default">
<v-pane>
<v-pane-header id="pane-header" aria-controls="pane-content">
[content]
</v-pane-header>
<v-pane-content id="pane-content" aria-labelledby="pane-header">
[content]
</v-pane-content>
</v-pane>
</v-accordion>
*/
/* Base styles
***************************************/
v-accordion {
display: block; }
v-pane {
display: block; }
v-pane.is-expanded > v-pane-content > div {
display: visible; }
v-pane[disabled] > v-pane-header {
opacity: 0.6;
pointer-events: none; }
v-pane-header {
display: block;
position: relative;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
outline: none; }
v-pane-header:focus {
outline: none; }
v-pane-header > div {
display: block; }
v-pane-content {
display: block;
position: relative;
overflow: hidden;
max-height: 0px; }
v-pane-content > div {
visibility: none; }
/* Theme: default
***************************************/
.vAccordion--default v-accordion {
margin-top: 20px;
padding-left: 20px; }
.vAccordion--default v-pane-content > div {
padding-bottom: 20px;
opacity: 0;
-webkit-transform: translate3d(0, 30px, 0);
transform: translate3d(0, 30px, 0);
-webkit-transition: all 0.5s;
transition: all 0.5s; }
.vAccordion--default v-pane {
overflow: hidden; }
.vAccordion--default v-pane.is-expanded > v-pane-header {
border-bottom-color: #2196F3; }
.vAccordion--default v-pane.is-expanded > v-pane-header::after {
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
opacity: 0; }
.vAccordion--default v-pane.is-expanded > v-pane-header::before {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
.vAccordion--default v-pane.is-expanded > v-pane-content > div {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); }
.vAccordion--default v-pane[disabled] v-pane-header::after, .vAccordion--default v-pane[disabled] v-pane-header::before {
display: none; }
.vAccordion--default v-pane-header {
padding: 5px 0;
margin-bottom: 20px;
border-bottom: 2px solid #D8D8D8;
-webkit-transition: all 0.25s;
transition: all 0.25s; }
.vAccordion--default v-pane-header::after, .vAccordion--default v-pane-header::before {
content: '';
display: block;
position: absolute;
top: 50%;
right: 0;
width: 10px;
height: 1px;
background-color: #2196F3;
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
will-change: transform;
-webkit-transition: all 0.25s;
transition: all 0.25s; }
.vAccordion--default v-pane-header::before {
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg); }
.vAccordion--default v-pane-header:hover, .vAccordion--default v-pane-header:focus {
color: #2196F3; }