feat: enhance ecommerce UI with typewriter animation, icon buttons, responsive layout, and refined design tokens
- EcommercePage.tsx: Add typewriter animation (useTypewriter hook) for slogan text with blinking cursor; replace text-based add/delete buttons with Ant Design icons (CloudUploadOutlined, DeleteOutlined); make command history panel responsive to window width (auto-collapse ≤1180px); update button labels from generic "添加" to context-specific "上传商品图" / "上传素材" - New useTypewriter.ts hook: Character-by-character typewriter animation with configurable speed and pause-before-loop, auto-resets on text change - reset.css: Add comprehensive HTML/body typography baseline (font-size, text-rendering, font-smoothing, line-height); extend reset coverage to select/canvas/svg elements; add overflow-wrap:anywhere for text-bearing elements; add min-width:0 to prevent form element overflow - primitives.css: Add reusable typography utility classes (ui-page-title, ui-section-title, ui-body-copy) with design token references - tokens.css: Expand design token set for typography scales, font weights, and leading values - ecommerce-standalone.css: Add 689 lines of standalone ecommerce page styles - Page CSS (ecommerce, image-workbench, more-tools, more, script-tokens, script-tokens-v5, studio-layout): Enhanced visual styles and layout refinements across all pages - app-shell.css: Shell-level layout and styling improvements
This commit is contained in:
@@ -15,6 +15,115 @@
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.ui-page-title {
|
||||
margin: 0;
|
||||
color: var(--fg-body);
|
||||
font-size: var(--text-title);
|
||||
font-weight: var(--weight-heavy);
|
||||
line-height: var(--leading-heading);
|
||||
}
|
||||
|
||||
.ui-section-title {
|
||||
margin: 0;
|
||||
color: var(--fg-body);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: var(--weight-bold);
|
||||
line-height: var(--leading-heading);
|
||||
}
|
||||
|
||||
.ui-body-copy {
|
||||
color: var(--fg-muted);
|
||||
font-size: var(--text-base);
|
||||
font-weight: var(--weight-regular);
|
||||
line-height: var(--leading-body);
|
||||
}
|
||||
|
||||
.ui-label {
|
||||
color: var(--fg-muted);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: var(--weight-semibold);
|
||||
line-height: var(--leading-control);
|
||||
}
|
||||
|
||||
:where(.ui-surface, .ui-card, .ui-panel) {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:where(.ui-card-grid, .responsive-card-grid) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(var(--card-min), 1fr));
|
||||
gap: var(--space-6);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:where(.ui-form-grid, .responsive-form-grid) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--space-6);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:where(.ui-form-grid, .responsive-form-grid) > * {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:where(.ui-toolbar, .responsive-toolbar) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
:where(.ui-button, .responsive-button) {
|
||||
min-width: 0;
|
||||
min-height: var(--form-control-min-height);
|
||||
font-family: var(--font-sans);
|
||||
font-size: var(--text-base);
|
||||
font-weight: var(--weight-bold);
|
||||
line-height: var(--leading-control);
|
||||
}
|
||||
|
||||
:where(.ui-media-frame, .responsive-media-frame) {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:where(.ui-media-frame, .responsive-media-frame) :where(img, video, canvas) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
:where(.ui-truncate) {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
:where(.ui-form-grid, .responsive-form-grid) {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
:where(.ui-card-grid, .responsive-card-grid) {
|
||||
gap: var(--space-5);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
:where(.ui-toolbar, .responsive-toolbar) {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
:where(.ui-toolbar, .responsive-toolbar) > :where(button, a, .ui-button, .responsive-button) {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.page-loading-skeleton {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -86,9 +195,9 @@
|
||||
}
|
||||
|
||||
.page-loading-center__text {
|
||||
font: 400 13px/1 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
|
||||
font: var(--weight-regular) var(--text-md) / var(--leading-control) var(--font-sans);
|
||||
color: var(--text-muted, rgba(255,255,255,.45));
|
||||
letter-spacing: 0.02em;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.page-loading-spinner {
|
||||
|
||||
Reference in New Issue
Block a user