@@ -59,87 +59,24 @@ const stickyClass = computed(() => ({
5959
6060<template >
6161 <div :class =" ['sticky-div', stickyClass]" :style =" style" >
62- <div class =" top-left-corner" ></div >
63- <div class =" top" ></div >
64- <div class =" top-right-corner" ></div >
65-
66- <div class =" left" ></div >
6762 <div class =" stage" :style =" style" >
6863 <slot name =" default" >
6964 <div class =" inner" ></div >
7065 </slot >
7166 </div >
72- <div class =" right" ></div >
73-
74- <div class =" bottom-right-corner" ></div >
75- <div class =" bottom" ></div >
76- <div class =" bottom-left-corner" ></div >
7767 </div >
7868</template >
7969
8070<style lang="scss" scoped>
81- .sticky-div {
82- display : grid ;
83- grid-template-columns : auto 1fr auto ;
84- grid-template-rows : auto 1fr auto ;
85- grid-template-areas :
86- ' top-left-corner top top-right-corner'
87- ' left center right'
88- ' bottom-left-corner bottom bottom-right-corner' ;
89- }
90-
9171.stage {
72+ display : grid ;
9273 padding : 0.3rem ;
9374 grid-area : center ;
9475 width : 100% ;
9576 height : 100% ;
9677 background-color : var (--color-main-background );
9778}
9879
99- .top-left-corner {
100- grid-area : top- left- corner;
101- height : 0 ;
102- width : 0 ;
103- }
104-
105- .top {
106- grid-area : top ;
107- height : 0 ;
108- }
109-
110- .top-right-corner {
111- grid-area : top- right- corner;
112- height : 0 ;
113- width : 0 ;
114- }
115-
116- .right {
117- grid-area : right ;
118- width : 0 ;
119- }
120-
121- .bottom-right-corner {
122- grid-area : bottom- right- corner;
123- height : 0 ;
124- width : 0 ;
125- }
126-
127- .bottom {
128- grid-area : bottom ;
129- height : 0 ;
130- }
131-
132- .bottom-left-corner {
133- grid-area : bottom- left- corner;
134- height : 0 ;
135- width : 0 ;
136- }
137-
138- .left {
139- grid-area : left ;
140- width : 0 ;
141- }
142-
14380.sticky-left {
14481 position : sticky ;
14582 inset-inline-start : 0 ;
@@ -150,20 +87,35 @@ const stickyClass = computed(() => ({
15087 top : 0 ;
15188}
15289
153- .bottom-right-corner ,
154- .bottom ,
155- .bottom-left-corner {
90+ .sticky-div.sticky-bottom-shadow ::after {
91+ content : ' ' ;
15692 background : linear-gradient (
15793 to bottom ,
15894 rgba (var (--color-box-shadow-rgb ), 0.3 ),
15995 rgba (var (--color-box-shadow-rgb ), 0 )
16096 );
97+ content : ' ' ;
98+ position : absolute ;
99+ width : 100% ;
100+ height : 6px ;
101+ bottom : -6px ;
102+ left : 0px ;
103+ z-index : -1 ;
104+ }
161105
162- transition :
163- all var (--animation-slow ) linear ,
164- border 1ms ;
165- .sticky-bottom-shadow & {
166- height : var (--shadow-height );
167- }
106+ .sticky-div.sticky-right-shadow ::after {
107+ content : ' ' ;
108+ background : linear-gradient (
109+ to right ,
110+ rgba (var (--color-box-shadow-rgb ), 0.3 ),
111+ rgba (var (--color-box-shadow-rgb ), 0 )
112+ );
113+ content : ' ' ;
114+ position : absolute ;
115+ height : 100% ;
116+ width : 6px ;
117+ right : -6px ;
118+ top : 0px ;
119+ z-index : -1 ;
168120}
169121 </style >
0 commit comments