Refactor chat component styles for responsiveness and consistency
- Updated padding and margin properties across various chat components to utilize responsive design tokens, ensuring better adaptability to different screen sizes. - Replaced fixed sizes with responsive variables for buttons, avatars, and bubbles to enhance UI flexibility. - Adjusted font sizes to use responsive tokens, improving text readability on various devices. - Standardized border-radius and other dimensions using CSS variables for a cohesive design language. - Enhanced dialog and screen components with safe area insets for better compatibility with modern devices.
This commit is contained in:
@@ -2,16 +2,17 @@
|
||||
|
||||
/* 键盘适配:
|
||||
* --chat-input-lift 是小米 Android + Facebook IAB 的专用抬升值。
|
||||
* env(safe-area-inset-bottom) 处理小米全面屏手势条 / iPhone home indicator。
|
||||
* --app-safe-bottom 处理小米全面屏手势条 / iPhone home indicator。
|
||||
* 正常浏览器中 --chat-input-lift 为 0,因此无视觉副作用。 */
|
||||
.bar {
|
||||
flex: 0 0 auto;
|
||||
padding: 0
|
||||
var(--spacing-lg, 16px)
|
||||
calc(var(--chat-inline-padding, 16px) + var(--app-safe-right, 0px))
|
||||
calc(
|
||||
var(--spacing-lg, 16px) + var(--chat-input-lift, 0px) +
|
||||
env(safe-area-inset-bottom, 0px)
|
||||
);
|
||||
var(--app-safe-bottom, 0px)
|
||||
)
|
||||
calc(var(--chat-inline-padding, 16px) + var(--app-safe-left, 0px));
|
||||
background: transparent;
|
||||
transition: padding-top 0.2s ease, padding-bottom 0.2s ease,
|
||||
background-color 0.2s ease, box-shadow 0.2s ease;
|
||||
@@ -30,7 +31,7 @@
|
||||
gap: var(--spacing-sm, 8px);
|
||||
padding: var(--spacing-sm, 8px);
|
||||
background: #fff;
|
||||
border-radius: 32px;
|
||||
border-radius: var(--radius-full, 999px);
|
||||
border: 1px solid transparent;
|
||||
transition: border-color 0.2s ease;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user