mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 08:06:24 +08:00
fix(core): replace most --affine with cssVar (#5728)
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
This commit is contained in:
+10
-11
@@ -1,28 +1,27 @@
|
||||
import { cssVar } from '@toeverything/theme';
|
||||
import { style } from '@vanilla-extract/css';
|
||||
|
||||
export const tag = style({
|
||||
padding: '0 15px',
|
||||
height: 20,
|
||||
lineHeight: '20px',
|
||||
borderRadius: 10,
|
||||
fontSize: 'var(--affine-font-xs)',
|
||||
|
||||
fontSize: cssVar('fontXs'),
|
||||
selectors: {
|
||||
'&.weak': {
|
||||
backgroundColor: 'var(--affine-tag-red)',
|
||||
color: 'var(--affine-error-color)',
|
||||
backgroundColor: cssVar('tagRed'),
|
||||
color: cssVar('errorColor'),
|
||||
},
|
||||
'&.medium': {
|
||||
backgroundColor: 'var(--affine-tag-orange)',
|
||||
color: 'var(--affine-warning-color)',
|
||||
backgroundColor: cssVar('tagOrange'),
|
||||
color: cssVar('warningColor'),
|
||||
},
|
||||
'&.strong': {
|
||||
backgroundColor: 'var(--affine-tag-green)',
|
||||
color: 'var(--affine-success-color)',
|
||||
backgroundColor: cssVar('tagGreen'),
|
||||
color: cssVar('successColor'),
|
||||
},
|
||||
'&.maximum': {
|
||||
backgroundColor: 'var(--affine-tag-red)',
|
||||
color: 'var(--affine-error-color)',
|
||||
backgroundColor: cssVar('tagRed'),
|
||||
color: cssVar('errorColor'),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user