Browse Source

Merge pull request #6737 from nocodb/nc-fix/table-scrollbar-style

Darkened table scrollbar
pull/6846/head
Muhammed Mustafa 1 year ago committed by GitHub
parent
commit
8b3f887c3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 68
      packages/nc-gui/assets/style.scss
  2. 2
      packages/nc-gui/components/smartsheet/grid/Table.vue

68
packages/nc-gui/assets/style.scss

@ -58,7 +58,7 @@ main {
} }
.mobile { .mobile {
.nc-scrollbar-md, nc-scrollbar-dark-md, nc-scrollbar-dark-md, nc-scrollbar-sm-dark, nc-scrollbar-x-md { .nc-scrollbar-md, .nc-scrollbar-x-md, .nc-scrollbar-dark-md, .nc-scrollbar-x-md-dark, .nc-scrollbar-x-lg {
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 0px; width: 0px;
} }
@ -68,6 +68,7 @@ main {
.nc-scrollbar-md { .nc-scrollbar-md {
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
scrollbar-width: thin !important;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 4px; width: 4px;
@ -81,16 +82,46 @@ main {
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
width: 4px; width: 4px;
@apply bg-gray-200;
}
&::-webkit-scrollbar-thumb:hover {
@apply bg-gray-300; @apply bg-gray-300;
} }
}
.nc-scrollbar-x-md {
overflow-x: scroll;
scrollbar-width: thin !important;
&::-webkit-scrollbar {
width: 4px;
height: 4px;
}
&::-webkit-scrollbar-track-piece {
width: 0px;
}
&::-webkit-scrollbar {
@apply bg-transparent;
}
&::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
width: 4px;
@apply bg-gray-200;
}
&::-webkit-scrollbar-thumb:hover { &::-webkit-scrollbar-thumb:hover {
@apply bg-gray-400; @apply bg-gray-300;
} }
} }
.nc-scrollbar-dark-md { .nc-scrollbar-dark-md {
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
scrollbar-width: thin !important;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 4px; width: 4px;
@ -119,13 +150,14 @@ main {
} }
} }
.nc-scrollbar-sm-dark { .nc-scrollbar-x-md-dark {
overflow-y: scroll; overflow-x: scroll;
overflow-x: hidden; scrollbar-width: thin !important;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 2px; width: 4px;
height: 2px; height: 4px;
} }
&::-webkit-scrollbar-track-piece { &::-webkit-scrollbar-track-piece {
width: 0px; width: 0px;
@ -134,20 +166,26 @@ main {
@apply bg-transparent; @apply bg-transparent;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
width: 4px; width: 4px;
@apply bg-gray-300; background-color: rgba(0, 0, 0, 0.3)
} }
&::-webkit-scrollbar-thumb:hover { &::-webkit-scrollbar-thumb:hover {
@apply bg-gray-400; background-color: rgba(0, 0, 0, 0.4)
} }
} }
.nc-scrollbar-x-md { .nc-scrollbar-x-lg {
overflow-x: scroll; overflow-x: scroll;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 4px; width: 8px;
height: 4px; height: 8px;
} }
&::-webkit-scrollbar-track-piece { &::-webkit-scrollbar-track-piece {
width: 0px; width: 0px;
@ -156,7 +194,11 @@ main {
@apply bg-transparent; @apply bg-transparent;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
width: 4px; -webkit-border-radius: 10px;
border-radius: 10px;
width: 8px;
@apply bg-gray-200; @apply bg-gray-200;
} }
&::-webkit-scrollbar-thumb:hover { &::-webkit-scrollbar-thumb:hover {

2
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -379,7 +379,7 @@ const gridWrapperClass = computed<string>(() => {
const classes = [] const classes = []
if (headerOnly !== true) { if (headerOnly !== true) {
if (!scrollParent.value) { if (!scrollParent.value) {
classes.push('nc-scrollbar-x-md overflow-auto') classes.push('nc-scrollbar-x-lg overflow-auto')
} }
} else { } else {
classes.push('overflow-visible') classes.push('overflow-visible')

Loading…
Cancel
Save