Skip to content

Commit 505569b

Browse files
committed
Fix desktop breakpoint
1 parent 0d17c34 commit 505569b

3 files changed

Lines changed: 7 additions & 15 deletions

File tree

src/components/layout/RightSideBar.astro

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,18 @@ function renderComponent(component: any, index: number, _components: any[]) {
9898

9999
<!-- 响应式样式和JavaScript -->
100100
<style>
101-
/* 响应式断点样式 */
101+
/* 响应式断点样式(不要再乱修改了QAQ) */
102102
@media (max-width: 768px) {
103103
#right-sidebar {
104104
display: var(--sidebar-mobile-display, block);
105105
}
106106
}
107-
108-
@media (min-width: 769px) and (max-width: 1024px) {
107+
@media (min-width: 769px) and (max-width: 1280px) {
109108
#right-sidebar {
110109
display: var(--sidebar-tablet-display, block);
111110
}
112111
}
113-
114-
@media (min-width: 1025px) {
112+
@media (min-width: 1281px) {
115113
#right-sidebar {
116114
display: var(--sidebar-desktop-display, block);
117115
}

src/components/widget/RightSideBar.astro

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,10 @@ const stickyComponents = widgetManager.getComponentsByPosition("sticky", "right"
7171
}
7272
}
7373

74-
/* 响应式设计 */
74+
/* 响应式设计(不要再乱修改了QAQ) */
7575
@media (max-width: 1280px) {
76-
.right-sidebar {
77-
max-width: 260px;
78-
}
79-
}
80-
81-
@media (max-width: 1024px) {
8276
.right-sidebar {
8377
display: none;
8478
}
8579
}
86-
</style>
80+
</style>

src/styles/widget-responsive.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
/* CSS 自定义属性定义 */
77
:root {
8-
/* 断点变量 */
8+
/* 断点变量(不要再乱修改了QAQ) */
99
--breakpoint-mobile: 768px;
1010
--breakpoint-tablet: 1024px;
11-
--breakpoint-desktop: 1025px;
11+
--breakpoint-desktop: 1280px;
1212

1313
/* 间距变量 */
1414
--widget-gap-mobile: 0.75rem;

0 commit comments

Comments
 (0)