File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/app/src/app/pages/Sandbox/Editor/Skeleton Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const pulse = keyframes`
77` ;
88
99export const SkeletonTextBlock = styled . div ( props => {
10- const color = props . theme . colors ?. sideBar . border || '#242424' ;
10+ let color = props . theme . colors ?. sideBar . border || '#242424' ;
1111 const themeType = props . theme . vscodeTheme . type ;
1212
1313 /**
@@ -23,7 +23,16 @@ export const SkeletonTextBlock = styled.div(props => {
2323 const backgroundLuminosity = themeType === 'light' ? 86 : 14 ;
2424 const highlightLuminosity = themeType === 'light' ? 88 : 16 ;
2525
26+ // Color('#ff000033') throws error.
27+ const colorWithOpacity = color . length === 9 ;
28+
29+ if ( colorWithOpacity ) {
30+ // remove the opacity
31+ color = color . slice ( 0 , - 2 ) ;
32+ }
33+
2634 const hsl = Color ( color ) . hsl ( ) ;
35+
2736 const background = Color ( { ...hsl , l : backgroundLuminosity } ) . hslString ( ) ;
2837 const highlight = Color ( { ...hsl , l : highlightLuminosity } ) . hslString ( ) ;
2938
You can’t perform that action at this time.
0 commit comments