refactoring

This commit is contained in:
Philipp Kühn
2021-02-04 11:08:56 +01:00
parent 035139064a
commit a835938503
3 changed files with 24 additions and 6 deletions

View File

@@ -35,6 +35,10 @@
background-color: rgba($colorBlack, 0.1); background-color: rgba($colorBlack, 0.1);
} }
::-webkit-scrollbar-thumb:hover {
background-color: rgba($colorBlack, 0.15);
}
::-webkit-scrollbar-button { ::-webkit-scrollbar-button {
display: none; display: none;
width: 0; width: 0;
@@ -45,6 +49,10 @@
background-color: transparent; background-color: transparent;
} }
::selection {
background: rgba($colorBlue, 0.5);
}
body { body {
font-family: 'Inter', sans-serif; font-family: 'Inter', sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@@ -56,8 +64,8 @@ body {
} }
*[id] { *[id] {
scroll-margin-top: 6rem; scroll-margin-top: 2rem;
scroll-snap-margin-top: 6rem; scroll-snap-margin-top: 2rem;
} }
button { button {

View File

@@ -144,7 +144,11 @@ export default {
computed: { computed: {
menuPortal() { menuPortal() {
if (this.windowWidth && this.windowWidth < 800) { if (!this.windowWidth) {
return
}
if (this.windowWidth < 800) {
return 'mobile-menu' return 'mobile-menu'
} }
@@ -152,7 +156,11 @@ export default {
}, },
sidebarPortal() { sidebarPortal() {
if (this.windowWidth && this.windowWidth < 800) { if (!this.windowWidth) {
return
}
if (this.windowWidth < 800) {
return 'mobile-sidebar' return 'mobile-sidebar'
} }
@@ -213,7 +221,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.handleResize() this.handleResize()
this.initSearch() this.initSearch()
}, 0) }, 10)
window.addEventListener('resize', this.handleResize) window.addEventListener('resize', this.handleResize)
}, },

View File

@@ -158,10 +158,12 @@ $menuBreakPoint: 800px;
&__close-icon { &__close-icon {
display: flex; display: flex;
flex: 0 0 auto; flex: 0 0 auto;
padding: 0.5rem;
background: transparent; background: transparent;
border: 0; border: 0;
color: $colorText; color: $colorText;
margin-left: 1.5rem; margin-left: 1.5rem;
margin-right: -0.5rem;
transition: color 0.2s $ease; transition: color 0.2s $ease;
&:hover { &:hover {
@@ -296,7 +298,7 @@ $menuBreakPoint: 800px;
font-weight: bold; font-weight: bold;
color: rgba($colorBlack, 0.2); color: rgba($colorBlack, 0.2);
position: absolute; position: absolute;
margin-left: -1.5em; margin-left: -1rem;
} }
} }