File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,25 @@ export const Scroll = recipe({
8787 } ,
8888 size : {
8989 "0" : {
90- scrollbarWidth : "none" ,
90+ "@supports" : {
91+ "(scrollbar-color: transparent transparent)" : {
92+ scrollbarWidth : "none" ,
93+ } ,
94+ } ,
9195 selectors : {
9296 "&::-webkit-scrollbar" : {
9397 display : "none" ,
9498 } ,
9599 } ,
96100 } ,
97101 "300" : {
98- scrollbarWidth : "thin" ,
102+ "@supports" : {
103+ "(scrollbar-color: transparent transparent)" : {
104+ // only apply scrollbarWidth if scrollbar-color is supported,
105+ // otherwise it breaks the colors in some browser like safari.
106+ scrollbarWidth : "thin" ,
107+ } ,
108+ } ,
99109 selectors : {
100110 "&::-webkit-scrollbar" : {
101111 width : toRem ( 8 ) ,
@@ -108,7 +118,11 @@ export const Scroll = recipe({
108118 } ,
109119 } ,
110120 "400" : {
111- scrollbarWidth : "auto" ,
121+ "@supports" : {
122+ "(scrollbar-color: transparent transparent)" : {
123+ scrollbarWidth : "auto" ,
124+ } ,
125+ } ,
112126 selectors : {
113127 "&::-webkit-scrollbar" : {
114128 width : toRem ( 16 ) ,
You can’t perform that action at this time.
0 commit comments