mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
104 lines
2.2 KiB
TypeScript
104 lines
2.2 KiB
TypeScript
import { style } from '@vanilla-extract/css';
|
|
|
|
export const root = style({
|
|
display: 'inline-flex',
|
|
alignItems: 'center',
|
|
borderRadius: '4px',
|
|
width: '100%',
|
|
minHeight: '30px',
|
|
userSelect: 'none',
|
|
cursor: 'pointer',
|
|
padding: '0 8px 0 12px',
|
|
fontSize: 'var(--affine-font-sm)',
|
|
margin: '2px 0',
|
|
selectors: {
|
|
'&:hover': {
|
|
background: 'var(--affine-hover-color)',
|
|
},
|
|
'&[data-active="true"]': {
|
|
background: 'var(--affine-hover-color)',
|
|
},
|
|
'&[data-disabled="true"]': {
|
|
cursor: 'default',
|
|
color: 'var(--affine-text-secondary-color)',
|
|
pointerEvents: 'none',
|
|
},
|
|
// this is not visible in dark mode
|
|
// '&[data-active="true"]:hover': {
|
|
// background:
|
|
// // make this a variable?
|
|
// 'linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)), rgba(0, 0, 0, 0.04)',
|
|
// },
|
|
'&[data-collapsible="true"]': {
|
|
width: 'calc(100% + 8px)',
|
|
transform: 'translateX(-8px)',
|
|
paddingLeft: '8px',
|
|
},
|
|
},
|
|
});
|
|
|
|
export const content = style({
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
whiteSpace: 'nowrap',
|
|
flex: 1,
|
|
});
|
|
|
|
export const postfix = style({
|
|
justifySelf: 'flex-end',
|
|
});
|
|
|
|
export const icon = style({
|
|
color: 'var(--affine-icon-color)',
|
|
fontSize: '20px',
|
|
});
|
|
|
|
export const collapsedIconContainer = style({
|
|
width: '12px',
|
|
height: '12px',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
borderRadius: '2px',
|
|
transition: 'transform 0.2s',
|
|
selectors: {
|
|
'&[data-collapsed="true"]': {
|
|
transform: 'rotate(-90deg)',
|
|
},
|
|
'&:hover': {
|
|
background: 'var(--affine-hover-color)',
|
|
},
|
|
},
|
|
});
|
|
|
|
export const iconsContainer = style({
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'flex-start',
|
|
width: '28px',
|
|
flexShrink: 0,
|
|
selectors: {
|
|
'&[data-collapsible="true"]': {
|
|
width: '40px',
|
|
},
|
|
},
|
|
});
|
|
|
|
export const collapsedIcon = style({
|
|
transition: 'transform 0.2s ease-in-out',
|
|
selectors: {
|
|
'&[data-collapsed="true"]': {
|
|
transform: 'rotate(-90deg)',
|
|
},
|
|
},
|
|
});
|
|
|
|
export const spacer = style({
|
|
flex: 1,
|
|
});
|
|
|
|
export const linkItemRoot = style({
|
|
color: 'inherit',
|
|
display: 'contents',
|
|
});
|