feat(FloatingChat): refactor chat width handling to be dynamic; enhance message panel positioning and styling with glass surface effects
This commit is contained in:
@@ -184,6 +184,78 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ---- Glass Surface (ReactBits-style) ---- */
|
||||
/*
|
||||
* Gradient border via padding-box/border-box background split —
|
||||
* most reliable technique in Chromium/Electron; no pseudo-element mask needed.
|
||||
*/
|
||||
.glass-surface {
|
||||
border: 1px solid transparent;
|
||||
background:
|
||||
/* glass fill — clips to padding-box (inside the border) */
|
||||
rgba(255, 255, 255, 0.55) padding-box,
|
||||
/* gradient border — clips to border-box (the 1px border strip) */
|
||||
linear-gradient(
|
||||
145deg,
|
||||
rgba(255, 255, 255, 0.90) 0%,
|
||||
rgba(200, 195, 205, 0.40) 40%,
|
||||
rgba(200, 195, 205, 0.20) 100%
|
||||
) border-box;
|
||||
backdrop-filter: blur(24px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(24px) saturate(180%);
|
||||
box-shadow:
|
||||
0 4px 48px rgba(0, 0, 0, 0.10),
|
||||
0 1px 2px rgba(0, 0, 0, 0.06),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.80);
|
||||
}
|
||||
|
||||
.dark .glass-surface {
|
||||
background:
|
||||
rgba(255, 255, 255, 0.05) padding-box,
|
||||
linear-gradient(
|
||||
145deg,
|
||||
rgba(255, 255, 255, 0.18) 0%,
|
||||
rgba(255, 255, 255, 0.04) 40%,
|
||||
rgba(255, 255, 255, 0.08) 100%
|
||||
) border-box;
|
||||
box-shadow:
|
||||
0 4px 48px rgba(0, 0, 0, 0.50),
|
||||
0 1px 2px rgba(0, 0, 0, 0.20),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
/* Subtle variant — same gradient border, much more transparent fill */
|
||||
.glass-surface-subtle {
|
||||
border: 1px solid transparent;
|
||||
background:
|
||||
rgba(255, 255, 255, 0.20) padding-box,
|
||||
linear-gradient(
|
||||
145deg,
|
||||
rgba(255, 255, 255, 0.70) 0%,
|
||||
rgba(200, 195, 205, 0.25) 40%,
|
||||
rgba(200, 195, 205, 0.10) 100%
|
||||
) border-box;
|
||||
backdrop-filter: blur(16px) saturate(160%);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(160%);
|
||||
box-shadow:
|
||||
0 2px 12px rgba(0, 0, 0, 0.06),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.60);
|
||||
}
|
||||
|
||||
.dark .glass-surface-subtle {
|
||||
background:
|
||||
rgba(255, 255, 255, 0.03) padding-box,
|
||||
linear-gradient(
|
||||
145deg,
|
||||
rgba(255, 255, 255, 0.12) 0%,
|
||||
rgba(255, 255, 255, 0.02) 40%,
|
||||
rgba(255, 255, 255, 0.05) 100%
|
||||
) border-box;
|
||||
box-shadow:
|
||||
0 2px 12px rgba(0, 0, 0, 0.30),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.07);
|
||||
}
|
||||
|
||||
/* Crepe editor layout */
|
||||
.milkdown-container {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user