File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed
packages/code-editor/src/SearchForm Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,38 @@ const getBaseContainerStyles = (theme: Theme) => css`
20
20
] } ;
21
21
border-bottom-left-radius : ${ borderRadius [ 150 ] } px;
22
22
border-bottom-right-radius : ${ borderRadius [ 150 ] } px;
23
- box-shadow : ${ shadow [ theme ] [ 100 ] } ;
24
23
width : 100% ;
25
24
max-width : ${ CONTAINER_MAX_WIDTH } px;
25
+ position : relative;
26
26
display : grid;
27
27
grid-template-rows : ${ SECTION_HEIGHT } px 0fr ;
28
- overflow : hidden;
29
28
transition : grid-template-rows ${ transitionDuration . slower } ms ease-in-out;
29
+ z-index : 1 ;
30
+
31
+ /** Add a shadow to the container while clipping the right edge*/
32
+ & ::after {
33
+ content : '' ;
34
+
35
+ /** Position the pseudo-element to match the parent's size and location */
36
+ position : absolute;
37
+ top : 0 ;
38
+ left : 0 ;
39
+ width : 100% ;
40
+ height : 100% ;
41
+
42
+ /** Apply the shadow to the pseudo-element */
43
+ box-shadow : ${ shadow [ theme ] [ 100 ] } ;
44
+
45
+ /** Negative values expand the clipping area outward, revealing the shadow. */
46
+ /** A zero value clips the shadow exactly at the element's edge. */
47
+ clip-path : inset (-20px 0px -20px -20px );
48
+
49
+ /** Match the parent's border-radius for consistency */
50
+ border-radius : inherit;
51
+
52
+ /** Places the pseudo-element behind the parent element */
53
+ z-index : -1 ;
54
+ }
30
55
` ;
31
56
32
57
const openContainerStyles = css `
You can’t perform that action at this time.
0 commit comments