style(market): 优化双超市响应式布局

This commit is contained in:
zhanjunhao
2026-11-13 14:38:54 +08:00
parent 0fe6151153
commit 28b71237df
6 changed files with 80 additions and 83 deletions
+49 -51
View File
@@ -125,7 +125,7 @@ html.dark .sm-theme {
.sm-hero {
flex-shrink: 0;
min-height: 235px;
padding: 28px 32px;
padding: 28px clamp(20px, 4vw, 80px);
display: flex;
flex-direction: column;
align-items: center;
@@ -400,10 +400,11 @@ html.dark .sm-theme {
.sm-workspace {
display: flex;
gap: 22px;
padding: 20px 28px 24px;
padding: 20px clamp(20px, 4vw, 80px) 24px;
flex: 1 1 0%;
min-width: 0;
min-height: 0;
max-width: 1920px;
max-width: 1760px;
width: 100%;
margin: 0 auto;
}
@@ -649,7 +650,7 @@ html.dark .sm-theme {
.sm-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
gap: 16px;
}
@@ -787,6 +788,7 @@ html.dark .sm-theme {
overflow: hidden;
margin: 0 0 18px;
min-height: 74px;
overflow-wrap: anywhere;
}
.sm-card-tags {
@@ -1019,25 +1021,17 @@ html.dark .sm-theme {
}
}
/* ---------- 断点(与原型 1540 / 1180 / 850 / 600 一致) ---------- */
/* ---------- 响应式:列数随目录宽度变化,中屏提前折叠侧栏 ---------- */
@media (max-width: 1540px) {
.sm-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sm-sidebar {
width: 248px;
}
}
@media (max-width: 1180px) {
.sm-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sm-workspace {
gap: 18px;
padding: 18px 20px 20px;
padding-block: 18px 20px;
}
.sm-sidebar {
@@ -1066,14 +1060,47 @@ html.dark .sm-theme {
}
}
@media (max-width: 850px) {
.sm-sidebar {
width: 205px;
@media (max-width: 1024px) {
.sm-workspace {
flex-direction: column;
gap: 0;
}
.sm-sidebar {
display: none;
width: 100%;
flex-shrink: 1;
margin-bottom: 10px;
padding: 12px 16px;
max-height: 45%;
overflow-y: auto;
}
.sm-sidebar.sm-sidebar-open {
display: block;
}
.sm-scope-options {
flex-direction: row;
}
.sm-scope-options .ant-btn {
flex: 1;
min-width: 0;
}
.sm-mobile-filter.ant-btn {
display: inline-flex;
}
.sm-result-bar {
flex-wrap: wrap;
}
}
@media (max-width: 850px) {
.sm-workspace {
padding: 16px;
gap: 12px;
padding-block: 16px;
}
.sm-grid {
@@ -1114,11 +1141,11 @@ html.dark .sm-theme {
}
}
/* Mobile filters collapse so the catalog remains usable below the hero. */
/* Mobile spacing preserves readable controls and card content. */
@media (max-width: 600px) {
.sm-hero {
min-height: 193px;
padding: 22px 16px;
padding: 22px 20px;
gap: 18px;
}
@@ -1172,35 +1199,7 @@ html.dark .sm-theme {
}
.sm-workspace {
flex-direction: column;
gap: 0;
padding: 10px 12px 14px;
}
.sm-sidebar {
display: none;
width: 100%;
flex-shrink: 1;
margin-bottom: 10px;
padding: 12px 16px;
max-height: 45%;
overflow-y: auto;
}
.sm-sidebar.sm-sidebar-open {
display: block;
}
.sm-scope-options {
flex-direction: row;
}
.sm-scope-options .ant-btn {
flex: 1;
}
.sm-mobile-filter.ant-btn {
display: inline-flex;
padding-block: 10px 14px;
}
.sm-filter-section {
@@ -1226,7 +1225,6 @@ html.dark .sm-theme {
}
.sm-grid {
grid-template-columns: minmax(0, 1fr);
gap: 14px;
}