2727body {
2828 margin : 0 ;
2929 padding : 0 ;
30- font-size : small;
30+ font-size : 16 px ; /* Doubled from typical 'small' (usually ~12px) to 16px */
3131 font-family : "Noto Sans" , "Lucida Grande" , "Lucida Sans Unicode" , Arial, Verdana, Helvetica, sans-serif;
3232 background-color : var (--bg-color );
3333 color : var (--text-color );
@@ -42,58 +42,74 @@ body {
4242.main-container {
4343 display : flex;
4444 flex : 1 ;
45- overflow : hidden;
46- min-height : 0 ; /* This is important for flex children to shrink */
45+ min-height : 100vh ; /* Allow expansion for long content */
4746}
4847
4948/* Content area */
5049# content {
5150 flex : 1 ;
51+ margin-left : 280px ; /* Account for fixed menu width */
5252 padding : 1em 2em ;
5353 overflow-y : auto;
5454 background-color : var (--bg-color );
5555 display : flex;
5656 flex-direction : column;
57+ min-height : 100vh ; /* Allow expansion for long content */
58+ box-sizing : border-box; /* Include padding in height calculation */
5759 transition : background-color 0.3s ease;
5860}
5961
6062/* Content wrapper to push footer down */
61- # content > * : not (footer ) {
62- flex-shrink : 0 ;
63+ .content-wrapper {
64+ flex : 1 ;
65+ display : flex;
66+ flex-direction : column;
67+ min-height : calc (100vh - 2em ); /* Minimum viewport height minus padding */
6368}
6469
65- # content > footer {
66- margin-top : auto; /* This is the "\hfill" equivalent */
70+ .content-main {
71+ flex : 1 ;
72+ min-height : 0 ; /* Allow content to shrink if needed */
6773}
6874
6975/* Footer styling */
7076footer {
71- margin-top : 3 em ;
77+ margin-top : auto ;
7278 padding : 1em 0 ;
7379 text-align : center;
7480 color : var (--text-color );
7581 opacity : 0.7 ;
7682 font-size : 0.9em ;
7783 border-top : 1px solid var (--border-color );
7884 transition : color 0.3s ease, border-color 0.3s ease;
85+ flex-shrink : 0 ;
7986}
8087
8188/* Responsive design */
8289@media (max-width : 768px ) {
83- .main-container {
84- flex-direction : column;
85- }
86-
8790 # menu {
91+ position : relative;
8892 width : 100% ;
8993 min-width : auto;
94+ height : auto;
9095 max-height : 200px ;
9196 border-right : none;
92- border-bottom : 1px solid # dee2e6 ;
97+ border-bottom : 1px solid var ( --border-color ) ;
9398 }
9499
95100 # content {
101+ margin-left : 0 ;
96102 padding : 1em ;
103+ min-height : calc (100vh - 200px ); /* Account for collapsed menu */
104+ box-sizing : border-box;
105+ }
106+
107+ .content-wrapper {
108+ min-height : calc (100vh - 200px - 2em ); /* Minimum height for mobile */
109+ }
110+
111+ .main-container {
112+ flex-direction : column;
97113 }
98114
99115 footer {
@@ -314,3 +330,56 @@ IMG.img_slide {
314330 margin-left : auto;
315331 margin-right : auto;
316332}
333+
334+ /* MathJax styling */
335+ .MathJax {
336+ font-size : 1em !important ;
337+ }
338+
339+ .MathJax_Display {
340+ margin : 1em 0 !important ;
341+ }
342+
343+ /* MathJax SVG styling */
344+ mjx-container [jax = "SVG" ] {
345+ /* overflow-x: auto; */
346+ overflow-y : visible;
347+ max-width : 100% ;
348+ display : inline-block;
349+ }
350+
351+ /* Display math (block equations) */
352+ mjx-container [jax = "SVG" ][display = "true" ] {
353+ display : block;
354+ text-align : center;
355+ margin : 1em 0 ;
356+ }
357+
358+ /* Inline math */
359+ mjx-container [jax = "SVG" ][display = "false" ] {
360+ display : inline-block !important ;
361+ vertical-align : baseline !important ;
362+ margin : 0 0.1em ;
363+ transform : translateY (-0.3em ) !important ;
364+ position : relative !important ;
365+ }
366+
367+ /* Target the SVG elements directly for better alignment */
368+ mjx-container [jax = "SVG" ][display = "false" ] svg {
369+ vertical-align : baseline !important ;
370+ position : relative !important ;
371+ top : -0.1em !important ;
372+ }
373+
374+ /* SVG elements should inherit text color for dark mode */
375+ [data-theme = "dark" ] mjx-container [jax = "SVG" ] svg {
376+ color : var (--text-color );
377+ }
378+
379+ /* Ensure SVG math scales properly on different screen sizes */
380+ @media (max-width : 768px ) {
381+ mjx-container [jax = "SVG" ] {
382+ max-width : 100% ;
383+ /* overflow-x: auto; */
384+ }
385+ }
0 commit comments