Skip to content
代码片段 群组 项目
未验证 提交 8c90370c 编辑于 作者: Sascha Eggenberger's avatar Sascha Eggenberger 提交者: GitLab
浏览文件

Tables: Add scroll indicator

Adds a visual scroll indicator (shadow) to indicate there is
more content available

Changelog: changed
上级 316158e4
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="!gl-my-4"> <div class="gl-table-shadow !gl-my-4">
<table ref="table" class="!gl-mb-2 !gl-mt-0 gl-overflow-y-hidden"> <table ref="table" class="!gl-mb-2 !gl-mt-0 gl-overflow-y-hidden">
<thead> <thead>
<tr v-if="table"> <tr v-if="table">
......
...@@ -41,12 +41,12 @@ table { ...@@ -41,12 +41,12 @@ table {
} }
} }
thead tr { thead tr {
th { th {
@apply gl-bg-subtle; @apply gl-bg-strong;
border-bottom: 0; border-bottom: 0;
&.wide { &.wide {
width: 55%; width: 55%;
} }
......
...@@ -175,6 +175,44 @@ ...@@ -175,6 +175,44 @@
margin: 10px 0; margin: 10px 0;
} }
@keyframes gl-table-shadow {
0% {
box-shadow:
inset -16px 0 14px -14px var(--gl-shadow-color-default),
inset 0 0 0 0 var(--gl-shadow-color-default);
}
5% {
box-shadow:
inset -16px 0 14px -14px var(--gl-shadow-color-default),
inset 16px 0 14px -14px var(--gl-shadow-color-default);
}
95% {
box-shadow:
inset -16px 0 14px -14px var(--gl-shadow-color-default),
inset 16px 0 14px -14px var(--gl-shadow-color-default);
}
100% {
box-shadow:
inset 0 0 0 0 var(--gl-shadow-color-default),
inset 16px 0 14px -14px var(--gl-shadow-color-default);
}
}
.gl-table-shadow {
overflow-x: auto;
animation: gl-table-shadow $gl-easing-out-cubic;
animation-timeline: scroll(self inline);
table:not(.code) {
display: table;
overflow-x: initial;
mix-blend-mode: multiply;
}
}
table:not(.code) { table:not(.code) {
margin: 16px 0; margin: 16px 0;
@apply gl-text-default; @apply gl-text-default;
...@@ -184,8 +222,7 @@ ...@@ -184,8 +222,7 @@
overflow-x: auto; overflow-x: auto;
tbody { tbody {
background-color: $white; @apply gl-bg-default;
} }
td, td,
...@@ -195,7 +232,7 @@ ...@@ -195,7 +232,7 @@
tr { tr {
th { th {
border-bottom: solid 2px $gray-200; @apply gl-border-b;
} }
} }
...@@ -523,7 +560,7 @@ ...@@ -523,7 +560,7 @@
h5, h5,
h6 { h6 {
$anchor-offset: 20px; $anchor-offset: 20px;
a.anchor { a.anchor {
float: left; float: left;
margin-left: calc(-1 * $anchor-offset); margin-left: calc(-1 * $anchor-offset);
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册