Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style(projects): calm folder card light tones, drop pocket blur (#22982)

AmAzing-cb7aa3ef86b2
diff --git a/src/features/Projects/List/FolderCard/AgentStack.tsx b/src/features/Projects/List/FolderCard/AgentStack.tsx
index 1d4deb0fe5a..03c6fe9c00c 100644
--- a/src/features/Projects/List/FolderCard/AgentStack.tsx
+++ b/src/features/Projects/List/FolderCard/AgentStack.tsx
@@ -12,7 +12,7 @@ const AVATAR_SIZE = 18;
const styles = stylex.create({
item: {
borderRadius: '50%',
- // Separates overlapping avatars against the pocket glass.
+ // A ring in the page tone, a shade off the pocket, separates overlapping avatars.
boxShadow: `0 0 0 1.5px ${cssVar.colorBgLayout}`,
display: 'inline-flex',
marginInlineStart: { ':first-child': 0, 'default': -6 },
diff --git a/src/features/Projects/List/FolderCard/index.tsx b/src/features/Projects/List/FolderCard/index.tsx
index 03996ccffe0..36816fb5e46 100644
--- a/src/features/Projects/List/FolderCard/index.tsx
+++ b/src/features/Projects/List/FolderCard/index.tsx
@@ -24,8 +24,14 @@ import { folderCardMarker } from './markers.stylex';
const PAPER_EASE = 'cubic-bezier(.2,.8,.2,1)';
const REDUCED_MOTION = '@media (prefers-reduced-motion: reduce)';
-// Opaque, so the tab laid over the back panel joins it without a darker overlap.
-const FOLDER_COLOR = `color-mix(in srgb, ${cssVar.colorText} 6%, ${cssVar.colorBgContainer})`;
+// Light mode keeps three tones apart so the card does not wash into the white
+// page: a grey folder, a lighter pocket in front of it, and the paper as the
+// only near-white surface, a shade off pure white. All opaque, so the tab laid
+// over the back panel joins it without a darker overlap.
+const FOLDER_COLOR = `color-mix(in srgb, ${cssVar.colorText} 8%, ${cssVar.colorBgContainer})`;
+const POCKET_COLOR = `color-mix(in srgb, ${cssVar.colorText} 6%, ${cssVar.colorBgContainer})`;
+const PAPER_COLOR = `color-mix(in srgb, ${cssVar.colorText} 2%, ${cssVar.colorBgContainer})`;
+const PAPER_BEHIND_COLOR = `color-mix(in srgb, ${cssVar.colorText} 4%, ${cssVar.colorBgContainer})`;
// Dark mode keeps the light layering: a recessed folder, the paper as the
// brightest surface, and a pocket close to the page.
const FOLDER_COLOR_DARK = `color-mix(in srgb, ${cssVar.colorBgLayout} 50%, ${cssVar.colorBgContainer})`;
@@ -33,7 +39,7 @@ const FOLDER_COLOR_DARK = `color-mix(in srgb, ${cssVar.colorBgLayout} 50%, ${css
const styles = stylex.create({
back: {
backgroundColor: FOLDER_COLOR,
- borderColor: cssVar.colorBorderSecondary,
+ borderColor: cssVar.colorBorder,
borderStyle: 'solid',
borderWidth: 1,
borderEndEndRadius: 16,
@@ -106,8 +112,8 @@ const styles = stylex.create({
paddingInlineEnd: 28,
},
paper: {
- backgroundColor: cssVar.colorBgElevated,
- borderColor: cssVar.colorBorderSecondary,
+ backgroundColor: PAPER_COLOR,
+ borderColor: cssVar.colorBorder,
borderRadius: 10,
borderStyle: 'solid',
borderWidth: 1,
@@ -127,7 +133,7 @@ const styles = stylex.create({
transitionTimingFunction: PAPER_EASE,
},
paperBehind: {
- backgroundColor: cssVar.colorBgContainer,
+ backgroundColor: PAPER_BEHIND_COLOR,
boxShadow: 'none',
insetBlockStart: 14,
insetInline: 28,
@@ -143,10 +149,11 @@ const styles = stylex.create({
paperDark: {
backgroundColor: `color-mix(in srgb, ${cssVar.colorText} 8%, ${cssVar.colorBgElevated})`,
},
+ // Opaque, without a backdrop blur: the papers slide up behind the pocket on
+ // hover, and a blur over them repaints the strip on every frame of that slide.
pocket: {
- backdropFilter: 'blur(16px) saturate(1.2)',
- backgroundColor: `color-mix(in srgb, ${cssVar.colorBgLayout} 78%, transparent)`,
- borderColor: cssVar.colorBorderSecondary,
+ backgroundColor: POCKET_COLOR,
+ borderColor: cssVar.colorBorder,
borderRadius: 16,
borderStyle: 'solid',
borderWidth: 1,
@@ -162,7 +169,7 @@ const styles = stylex.create({
position: 'absolute',
},
pocketDark: {
- backgroundColor: `color-mix(in srgb, ${cssVar.colorBgContainer} 78%, transparent)`,
+ backgroundColor: cssVar.colorBgContainer,
},
root: {
height: 300,
@@ -177,7 +184,7 @@ const styles = stylex.create({
tab: {
backgroundColor: FOLDER_COLOR,
borderBlockEndWidth: 0,
- borderColor: cssVar.colorBorderSecondary,
+ borderColor: cssVar.colorBorder,
borderStartEndRadius: 12,
borderStartStartRadius: 12,
borderStyle: 'solid',
@@ -198,7 +205,7 @@ interface FolderCardProps {
/**
* A project as a folder: a back panel with a tab, the project's latest content
- * on a paper inside, and a frosted pocket in front with its name and numbers.
+ * on a paper inside, and a pocket in front with its name and numbers.
*/
export const FolderCard = memo<FolderCardProps>(({ overviewStatus, project }) => {
const { t } = useTranslation('project');