using a [babel plugin](https://gist.github.com/pengx17/49e24ae8a5a609bdaff122ee8c679d1c) to transform all var(--affine-xxx) to cssVar Some issues: - tried ast-grep but it seems to be not easy to add imports conditionally - current work does not work well with ts with types because babel will strip them out
30 lines
604 B
TypeScript
30 lines
604 B
TypeScript
import { cssVar } from '@toeverything/theme';
|
|
import { style } from '@vanilla-extract/css';
|
|
export const globalLoadingWrapperStyle = style({
|
|
position: 'fixed',
|
|
top: 0,
|
|
left: 0,
|
|
bottom: 0,
|
|
right: '100%',
|
|
zIndex: 5,
|
|
backgroundColor: cssVar('backgroundModalColor'),
|
|
opacity: 0,
|
|
transition: 'opacity .3s',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
color: cssVar('processingColor'),
|
|
'@media': {
|
|
print: {
|
|
display: 'none',
|
|
zIndex: -1,
|
|
},
|
|
},
|
|
selectors: {
|
|
'&[data-loading="true"]': {
|
|
right: 0,
|
|
opacity: 1,
|
|
},
|
|
},
|
|
});
|