Skip to content

Commit ab0a167

Browse files
committed
style: Replace pesudo-div with mask-image for better fading out
1 parent b57886b commit ab0a167

2 files changed

Lines changed: 15 additions & 22 deletions

File tree

_sass/_tab-main.scss

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,23 @@
7171
text-align: left;
7272
&.limit-height {
7373
max-height: var(--grid-body-height);
74-
position: relative;
7574
overflow-y: auto;
7675
padding-bottom: 0;
7776
box-sizing: border-box;
78-
&::after {
79-
content: "";
80-
position: sticky;
81-
display: block;
82-
bottom: 0;
83-
left: 0;
84-
right: 0;
85-
height: 30px;
86-
opacity: 0;
87-
padding: 0;
88-
margin: 0;
89-
background: linear-gradient(to top,
90-
rgba(0, 0, 0, 0.12) 0%,
91-
transparent 100%);
92-
pointer-events: none; /* clicks pass through */
93-
transition: opacity 0.4s ease;
94-
z-index: 1;
95-
}
96-
&.has-more::after {
97-
opacity: 1;
77+
&.has-more {
78+
-webkit-mask-image: linear-gradient(
79+
to bottom,
80+
black 0%,
81+
black calc(100% - 100px), // solid/opaque until 100px from bottom
82+
transparent 100% // fade to fully transparent
83+
);
84+
mask-image: linear-gradient(
85+
to bottom,
86+
black 0%,
87+
black calc(100% - 100px),
88+
transparent 100%
89+
);
90+
transition: mask-image 0.4s ease;
9891
}
9992
}
10093
h2 {

_sass/init.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
// @forward 'default' with ( $color-fg: white );
77

88
// Make grid boxes the same height (scrollable)
9-
// @forward 'default' with ( $grid-body-height: 200px );
9+
// @forward 'default' with ( $grid-body-height: 260px );

0 commit comments

Comments
 (0)