Skip to content

Commit b341545

Browse files
committed
add options backdrop
1 parent 84e8411 commit b341545

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/app.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
<i title="Show options" class="show-options fas fa-sliders-h" aria-hidden="true" @click="toggleOptions" />
2121

22+
<div v-show="showOptions" class="backdrop" @click="showOptions = false"></div>
2223
<div v-show="showOptions" class="options">
2324
<div class="columns">
2425
<div class="column has-text-centered">
@@ -235,9 +236,10 @@ body,
235236
.options {
236237
padding: 2rem 2rem 3rem;
237238
position: absolute;
238-
top: 25%;
239+
top: calc(50% - 300px);
239240
width: var(--options-width);
240241
left: calc(50% - var(--options-width) / 2);
242+
z-index: 300;
241243
}
242244
243245
body {
@@ -258,4 +260,14 @@ body {
258260
transform: scale(1.1);
259261
color: #333;
260262
}
263+
264+
.backdrop {
265+
position: fixed;
266+
top: 0;
267+
left: 0;
268+
width: 100%;
269+
height: 100%;
270+
background-color: rgba(0, 0, 0, 0.5);
271+
z-index: 200;
272+
}
261273
</style>

0 commit comments

Comments
 (0)