Skip to content

Commit

Permalink
Merge pull request #152 from vichydra/fix-scrollbar
Browse files Browse the repository at this point in the history
feat: fix preview scrollbars
  • Loading branch information
zugdev authored Nov 3, 2024
2 parents 2334b9f + f4cba62 commit 6dc2dab
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 12 deletions.
15 changes: 9 additions & 6 deletions static/style/inverted-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@
}
.preview-body-inner {
padding: 16px;
overflow: scroll;
}
.preview-body-inner > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -627,11 +626,6 @@
overflow: hidden;
text-overflow: ellipsis;
}
.preview-body {
overflow: scroll;
max-height: calc(100vh - 156px);
display: block;
}
.preview button.close-preview {
right: 0;
top: 0;
Expand Down Expand Up @@ -912,6 +906,7 @@

.preview-body {
overflow-y: auto;
overflow-x: hidden;
/* Update height calculation to use dvh */
max-height: calc(100dvh - 180px - env(safe-area-inset-bottom, 0px));
display: block;
Expand All @@ -922,4 +917,12 @@
/* Prevent content from going under bottom bar */
/* padding-bottom: 48px; */
}

.preview-body::-webkit-scrollbar {
width: 2px;
}

.preview-body::-webkit-scrollbar-thumb {
border-radius: 4px;
}
}
22 changes: 22 additions & 0 deletions static/style/special.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@
#issues-container::after {
filter: blur(0px) drop-shadow(0 0 8px #fff);
}
.preview-body::-webkit-scrollbar-track {
background: var(--dark-background); /* Background */
}

.preview-body::-webkit-scrollbar-thumb {
background-color: var(--light-background-half); /* Scrollbar thumb */
}

.preview-body::-webkit-scrollbar-thumb:hover {
background-color: var(--light-background);
}
}

@media (prefers-color-scheme: light) {
Expand Down Expand Up @@ -70,6 +81,17 @@
animation: none;
background-image: none;
}
.preview-body::-webkit-scrollbar-track {
background: var(--light-background); /* Background */
}

.preview-body::-webkit-scrollbar-thumb {
background-color: var(--dark-background-half); /* Scrollbar thumb */
}

.preview-body::-webkit-scrollbar-thumb:hover {
background-color: var(--dark-background);
}
}

@keyframes highlight-dark-mode {
Expand Down
15 changes: 9 additions & 6 deletions static/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@
}
.preview-body-inner {
padding: 16px;
overflow: scroll;
}
.preview-body-inner > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -627,11 +626,6 @@
overflow: hidden;
text-overflow: ellipsis;
}
.preview-body {
overflow: scroll;
max-height: calc(100vh - 156px);
display: block;
}
.preview button.close-preview {
right: 0;
top: 0;
Expand Down Expand Up @@ -912,6 +906,7 @@

.preview-body {
overflow-y: auto;
overflow-x: hidden;
/* Update height calculation to use dvh */
max-height: calc(100dvh - 180px - env(safe-area-inset-bottom, 0px));
display: block;
Expand All @@ -922,4 +917,12 @@
/* Prevent content from going under bottom bar */
/* padding-bottom: 48px; */
}

.preview-body::-webkit-scrollbar {
width: 2px;
}

.preview-body::-webkit-scrollbar-thumb {
border-radius: 4px;
}
}

0 comments on commit 6dc2dab

Please sign in to comment.