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
12 lines
317 B
TypeScript
12 lines
317 B
TypeScript
import { cssVar } from '@toeverything/theme';
|
|
import { style } from '@vanilla-extract/css';
|
|
export const tooltipContent = style({
|
|
backgroundColor: cssVar('tooltip'),
|
|
color: cssVar('white'),
|
|
padding: '5px 12px',
|
|
fontSize: cssVar('fontSm'),
|
|
lineHeight: '22px',
|
|
borderRadius: '4px',
|
|
maxWidth: '280px',
|
|
});
|