Skip to content

Commit 63a053e

Browse files
fix: consolidate navbar media queries to fix Bootstrap breakpoint conflict
Agent-Logs-Url: https://github.com/ThisIs-Developer/Markdown-Viewer/sessions/885bd598-8a4f-4fe8-925d-b7b91082f7c6 Co-authored-by: ThisIs-Developer <109382325+ThisIs-Developer@users.noreply.github.com>
1 parent 77abb99 commit 63a053e

2 files changed

Lines changed: 106 additions & 108 deletions

File tree

desktop-app/resources/styles.css

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -354,28 +354,7 @@ body {
354354
color: var(--text-color);
355355
}
356356

357-
/* Responsive design for mobile */
358-
@media (max-width: 1080px) {
359-
.content-container {
360-
flex-direction: column;
361-
}
362-
363-
.editor-pane, .preview-pane {
364-
flex: none;
365-
height: 50%;
366-
border-right: none;
367-
}
368-
369-
.editor-pane {
370-
border-bottom: 1px solid var(--border-color);
371-
}
372-
373-
.toolbar {
374-
flex-wrap: wrap;
375-
justify-content: center;
376-
gap: 1rem;
377-
}
378-
}
357+
379358

380359
/* Loading indicators */
381360
.loading {
@@ -678,11 +657,7 @@ a:focus {
678657
z-index: 1001;
679658
}
680659

681-
@media (max-width: 1080px) {
682-
.mobile-menu {
683-
display: block;
684-
}
685-
}
660+
686661

687662
/* slide‑in panel */
688663
.mobile-menu-panel {
@@ -899,12 +874,56 @@ a:focus {
899874
font-size: 0.9rem;
900875
}
901876

902-
/* hide desktop-only stats and toolbar on mobile */
903-
@media (max-width: 767px) {
904-
.stats-container.d-none.d-md-flex,
905-
.toolbar.d-none.d-md-flex {
877+
/* ==========================================
878+
NAVBAR RESPONSIVE BREAKPOINTS
879+
>= 1080px : full desktop navbar
880+
< 1080px : mobile hamburger + stacked panes
881+
========================================== */
882+
883+
/* Mobile / tablet (< 1080px): switch to hamburger, stack panes */
884+
@media (max-width: 1079px) {
885+
/* Override Bootstrap d-md-flex / d-md-none so the breakpoint is 1080px */
886+
.stats-container,
887+
.view-mode-group,
888+
.toolbar {
906889
display: none !important;
907890
}
891+
892+
.mobile-menu {
893+
display: block !important;
894+
}
895+
896+
/* Stack editor and preview vertically */
897+
.content-container {
898+
flex-direction: column;
899+
}
900+
901+
.editor-pane,
902+
.preview-pane {
903+
flex: none;
904+
height: 50%;
905+
border-right: none;
906+
}
907+
908+
.editor-pane {
909+
border-bottom: 1px solid var(--border-color);
910+
}
911+
912+
/* Hide drag-resize divider (touch devices don't use it) */
913+
.resize-divider {
914+
display: none;
915+
}
916+
917+
/* Single-pane view modes: occupy full height */
918+
.content-container.view-editor-only .editor-pane,
919+
.content-container.view-preview-only .preview-pane {
920+
height: 100%;
921+
}
922+
923+
.content-container.view-split .editor-pane,
924+
.content-container.view-split .preview-pane {
925+
height: 50%;
926+
}
908927
}
909928

910929
.github-link {
@@ -1023,7 +1042,7 @@ a:focus {
10231042
flex: 1;
10241043
}
10251044

1026-
/* Responsive adjustments for view mode buttons and toolbar */
1045+
/* Compact desktop (< 1280px): icon-only view mode buttons, compact toolbar */
10271046
@media (max-width: 1280px) {
10281047
/* Icon-only view mode buttons at medium widths */
10291048
.view-mode-btn span {
@@ -1044,11 +1063,7 @@ a:focus {
10441063
}
10451064
}
10461065

1047-
@media (max-width: 767px) {
1048-
.view-mode-group {
1049-
display: none;
1050-
}
1051-
}
1066+
10521067

10531068
/* ========================================
10541069
RESIZE DIVIDER - Story 1.3
@@ -1095,12 +1110,7 @@ a:focus {
10951110
display: none;
10961111
}
10971112

1098-
/* Hide divider on tablet and mobile (no drag resize) */
1099-
@media (max-width: 1079px) {
1100-
.resize-divider {
1101-
display: none;
1102-
}
1103-
}
1113+
11041114

11051115
/* Prevent text selection during drag */
11061116
.resizing {
@@ -1180,18 +1190,7 @@ a:focus {
11801190
RESPONSIVE VIEW MODE FIXES - Story 1.5
11811191
======================================== */
11821192

1183-
/* On tablet/mobile, ensure single-pane modes take full height */
1184-
@media (max-width: 1079px) {
1185-
.content-container.view-editor-only .editor-pane,
1186-
.content-container.view-preview-only .preview-pane {
1187-
height: 100%;
1188-
}
11891193

1190-
.content-container.view-split .editor-pane,
1191-
.content-container.view-split .preview-pane {
1192-
height: 50%;
1193-
}
1194-
}
11951194

11961195
/* ========================================
11971196
PDF EXPORT TABLE FIX - Rowspan/Colspan

styles.css

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -354,28 +354,7 @@ body {
354354
color: var(--text-color);
355355
}
356356

357-
/* Responsive design for mobile */
358-
@media (max-width: 1080px) {
359-
.content-container {
360-
flex-direction: column;
361-
}
362-
363-
.editor-pane, .preview-pane {
364-
flex: none;
365-
height: 50%;
366-
border-right: none;
367-
}
368-
369-
.editor-pane {
370-
border-bottom: 1px solid var(--border-color);
371-
}
372-
373-
.toolbar {
374-
flex-wrap: wrap;
375-
justify-content: center;
376-
gap: 1rem;
377-
}
378-
}
357+
379358

380359
/* Loading indicators */
381360
.loading {
@@ -678,11 +657,7 @@ a:focus {
678657
z-index: 1001;
679658
}
680659

681-
@media (max-width: 1080px) {
682-
.mobile-menu {
683-
display: block;
684-
}
685-
}
660+
686661

687662
/* slide‑in panel */
688663
.mobile-menu-panel {
@@ -899,12 +874,56 @@ a:focus {
899874
font-size: 0.9rem;
900875
}
901876

902-
/* hide desktop-only stats and toolbar on mobile */
903-
@media (max-width: 767px) {
904-
.stats-container.d-none.d-md-flex,
905-
.toolbar.d-none.d-md-flex {
877+
/* ==========================================
878+
NAVBAR RESPONSIVE BREAKPOINTS
879+
>= 1080px : full desktop navbar
880+
< 1080px : mobile hamburger + stacked panes
881+
========================================== */
882+
883+
/* Mobile / tablet (< 1080px): switch to hamburger, stack panes */
884+
@media (max-width: 1079px) {
885+
/* Override Bootstrap d-md-flex / d-md-none so the breakpoint is 1080px */
886+
.stats-container,
887+
.view-mode-group,
888+
.toolbar {
906889
display: none !important;
907890
}
891+
892+
.mobile-menu {
893+
display: block !important;
894+
}
895+
896+
/* Stack editor and preview vertically */
897+
.content-container {
898+
flex-direction: column;
899+
}
900+
901+
.editor-pane,
902+
.preview-pane {
903+
flex: none;
904+
height: 50%;
905+
border-right: none;
906+
}
907+
908+
.editor-pane {
909+
border-bottom: 1px solid var(--border-color);
910+
}
911+
912+
/* Hide drag-resize divider (touch devices don't use it) */
913+
.resize-divider {
914+
display: none;
915+
}
916+
917+
/* Single-pane view modes: occupy full height */
918+
.content-container.view-editor-only .editor-pane,
919+
.content-container.view-preview-only .preview-pane {
920+
height: 100%;
921+
}
922+
923+
.content-container.view-split .editor-pane,
924+
.content-container.view-split .preview-pane {
925+
height: 50%;
926+
}
908927
}
909928

910929
.github-link {
@@ -1023,7 +1042,7 @@ a:focus {
10231042
flex: 1;
10241043
}
10251044

1026-
/* Responsive adjustments for view mode buttons and toolbar */
1045+
/* Compact desktop (< 1280px): icon-only view mode buttons, compact toolbar */
10271046
@media (max-width: 1280px) {
10281047
/* Icon-only view mode buttons at medium widths */
10291048
.view-mode-btn span {
@@ -1044,11 +1063,7 @@ a:focus {
10441063
}
10451064
}
10461065

1047-
@media (max-width: 767px) {
1048-
.view-mode-group {
1049-
display: none;
1050-
}
1051-
}
1066+
10521067

10531068
/* ========================================
10541069
RESIZE DIVIDER - Story 1.3
@@ -1095,12 +1110,7 @@ a:focus {
10951110
display: none;
10961111
}
10971112

1098-
/* Hide divider on tablet and mobile (no drag resize) */
1099-
@media (max-width: 1079px) {
1100-
.resize-divider {
1101-
display: none;
1102-
}
1103-
}
1113+
11041114

11051115
/* Prevent text selection during drag */
11061116
.resizing {
@@ -1180,18 +1190,7 @@ a:focus {
11801190
RESPONSIVE VIEW MODE FIXES - Story 1.5
11811191
======================================== */
11821192

1183-
/* On tablet/mobile, ensure single-pane modes take full height */
1184-
@media (max-width: 1079px) {
1185-
.content-container.view-editor-only .editor-pane,
1186-
.content-container.view-preview-only .preview-pane {
1187-
height: 100%;
1188-
}
11891193

1190-
.content-container.view-split .editor-pane,
1191-
.content-container.view-split .preview-pane {
1192-
height: 50%;
1193-
}
1194-
}
11951194

11961195
/* ========================================
11971196
PDF EXPORT TABLE FIX - Rowspan/Colspan

0 commit comments

Comments
 (0)