Skip to content

Commit 196e817

Browse files
Fix the modal example transition in Firefox (vuejs#2163)
1 parent 80d2eb5 commit 196e817

File tree

2 files changed

+17
-24
lines changed

2 files changed

+17
-24
lines changed

src/examples/src/modal/Modal/style.css

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@
66
width: 100%;
77
height: 100%;
88
background-color: rgba(0, 0, 0, 0.5);
9-
display: table;
9+
display: flex;
1010
transition: opacity 0.3s ease;
1111
}
1212

13-
.modal-wrapper {
14-
display: table-cell;
15-
vertical-align: middle;
16-
}
17-
1813
.modal-container {
1914
width: 300px;
20-
margin: 0px auto;
15+
margin: auto;
2116
padding: 20px 30px;
2217
background-color: #fff;
2318
border-radius: 2px;

src/examples/src/modal/Modal/template.html

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
<Transition name="modal">
22
<div v-if="show" class="modal-mask">
3-
<div class="modal-wrapper">
4-
<div class="modal-container">
5-
<div class="modal-header">
6-
<slot name="header">default header</slot>
7-
</div>
3+
<div class="modal-container">
4+
<div class="modal-header">
5+
<slot name="header">default header</slot>
6+
</div>
87

9-
<div class="modal-body">
10-
<slot name="body">default body</slot>
11-
</div>
8+
<div class="modal-body">
9+
<slot name="body">default body</slot>
10+
</div>
1211

13-
<div class="modal-footer">
14-
<slot name="footer">
15-
default footer
16-
<button
17-
class="modal-default-button"
18-
@click="$emit('close')"
19-
>OK</button>
20-
</slot>
21-
</div>
12+
<div class="modal-footer">
13+
<slot name="footer">
14+
default footer
15+
<button
16+
class="modal-default-button"
17+
@click="$emit('close')"
18+
>OK</button>
19+
</slot>
2220
</div>
2321
</div>
2422
</div>

0 commit comments

Comments
 (0)