diff --git a/website/assets/css/_components/_tables.sass b/website/assets/css/_components/_tables.sass index 1878e2c5e..021b9521a 100644 --- a/website/assets/css/_components/_tables.sass +++ b/website/assets/css/_components/_tables.sass @@ -62,9 +62,15 @@ &:last-child @include scroll-shadow-cover(right, $color-back) + &:first-child:last-child + @include scroll-shadow-cover(both, $color-back) + .c-table__row--foot .c-table__cell &:first-child @include scroll-shadow-cover(left, lighten($color-subtle-light, 2)) &:last-child @include scroll-shadow-cover(right, lighten($color-subtle-light, 2)) + + &:first-child:last-child + @include scroll-shadow-cover(both, lighten($color-subtle-light, 2)) diff --git a/website/assets/css/_mixins.sass b/website/assets/css/_mixins.sass index 641f6e148..d1ea9c5d5 100644 --- a/website/assets/css/_mixins.sass +++ b/website/assets/css/_mixins.sass @@ -42,6 +42,9 @@ // $scroll-shadow-side - side to cover shadow (left or right) // $scroll-shadow-background - original background color to match +@function scroll-shadow-gradient($scroll-gradient-direction, $scroll-shadow-background) + @return linear-gradient(to #{$scroll-gradient-direction}, rgba($scroll-shadow-background, 1) 50%, rgba($scroll-shadow-background, 0) 100%) + @mixin scroll-shadow-base($scroll-shadow-color, $scroll-shadow-intensity: 0.2) background: radial-gradient(ellipse at 0 50%, rgba($scroll-shadow-color, $scroll-shadow-intensity) 0%, rgba(0,0,0,0) 75%) 0 center, radial-gradient(ellipse at 100% 50%, rgba($scroll-shadow-color, $scroll-shadow-intensity) 0%, transparent 75%) 100% center background-attachment: scroll, scroll @@ -50,15 +53,19 @@ @mixin scroll-shadow-cover($scroll-shadow-side, $scroll-shadow-background) $scroll-gradient-direction: right !default + background-repeat: no-repeat @if $scroll-shadow-side == right $scroll-gradient-direction: left background-position: 100% 0 - background-image: linear-gradient(to #{$scroll-gradient-direction}, rgba($scroll-shadow-background, 1) 50%, rgba($scroll-shadow-background, 0) 100%) - background-repeat: no-repeat - background-size: 20px 100% - + @if $scroll-shadow-side == both + background-image: scroll-shadow-gradient(left, $scroll-shadow-background), scroll-shadow-gradient(right, $scroll-shadow-background) + background-position: 100% 0, 0 0 + background-size: 20px 100%, 20px 100% + @else + background-image: scroll-shadow-gradient($scroll-gradient-direction, $scroll-shadow-background) + background-size: 20px 100% // Full vertical scroll shadows // adapted from: https://codepen.io/laustdeleuran/pen/DBaAu