Skip to content

Commit

Permalink
z-indexとかレイアウトとかがバグってたの直した
Browse files Browse the repository at this point in the history
  • Loading branch information
mehm8128 committed Dec 26, 2023
1 parent 284d998 commit fa466da
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
7 changes: 5 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const showCover = computed(() => isMobile.value && isOpenNavigationBar.value)
watch(
() => route.fullPath,
() => {
if (!isMobile.value) {
return
}
isOpenNavigationBar.value = false
}
)
Expand Down Expand Up @@ -67,7 +70,7 @@ watch(
@media (width <= 768px) {
.navigationBarCover {
position: absolute;
z-index: --z-index-navigationBarCover;
z-index: $z-index-navigationBarCover;
top: 5rem;
left: 0;
height: 100%;
Expand All @@ -77,7 +80,7 @@ watch(
}
.navigationBar {
position: absolute;
z-index: --z-index-navigationBar;
z-index: $z-index-navigationBar;
top: 5rem;
left: 0;
height: 100%;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Layout/PageContainer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts"></script>

<template>
<main :class="$style.container"><slot /></main>
<main :class="$style.container">
<slot />
</main>
</template>

<style lang="scss" module>
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import App from './App.vue'
import type { PluginOptions } from 'vue-toastification'
import Toast, { POSITION } from 'vue-toastification'
import 'vue-toastification/dist/index.css'
import './styles/toast.scss'

import './index.scss'
import '@purge-icons/generated'
Expand Down
File renamed without changes.
6 changes: 2 additions & 4 deletions src/styles/z-index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
:root {
--z-index-navigationBar: 40;
--z-index-navigationBarCover: 30;
}
$z-index-navigationBar: 40;
$z-index-navigationBarCover: 30;
6 changes: 5 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ const config: UserConfig = {
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "${srcPath}/styles/common.scss";`
additionalData: `
@import "${srcPath}/styles/color.scss";
@import "${srcPath}/styles/z-index.scss";
@import "${srcPath}/styles/toast.scss";
`
}
}
},
Expand Down

0 comments on commit fa466da

Please sign in to comment.