File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ object[type="image/svg+xml"]:not([width]) {
148
148
149
149
/* Firefox-specific CSS to fix flexbox shrinking issue */
150
150
@-moz-document url-prefix() {
151
- main > . content .doc ,
151
+ main > div .doc ,
152
152
article .doc {
153
153
flex-shrink : 0 ; /* Prevent excessive shrinking in Firefox */
154
154
}
Original file line number Diff line number Diff line change 17
17
}
18
18
}
19
19
20
+ /* Apply aggressive flexbox fix only above 1200px where the original problem occurs */
21
+ @media screen and (min-width : 1200px ) {
22
+ .doc {
23
+ flex : 1 1 0% ;
24
+ width : 0 ; /* Force flexbox to ignore content width */
25
+ max-width : var (--doc-max-width--desktop ); /* Restore max-width for centering */
26
+ }
27
+ }
28
+
20
29
/* === HEADING STYLES === */
21
30
.doc h1 ,
22
31
.doc h2 ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ body.-toc aside.toc.sidebar {
7
7
display : none;
8
8
}
9
9
10
- main > . content {
10
+ main > div {
11
11
overflow-x : auto;
12
12
max-width : 100vw ;
13
13
}
@@ -19,7 +19,7 @@ body.-toc aside.toc.sidebar {
19
19
min-width : 0 ; /* min-width: 0 required for flexbox to constrain overflowing elements */
20
20
}
21
21
22
- main > . content {
22
+ main > div {
23
23
display : flex;
24
24
}
25
25
@@ -33,8 +33,19 @@ body.-toc aside.toc.sidebar {
33
33
}
34
34
}
35
35
36
+ @media screen and (min-width : 1280px ) { /* Use xl breakpoint to match existing xl:items-center */
37
+ main {
38
+ max-width : calc (var (--doc-max-width--desktop ) + var (--toc-width )); /* Article + TOC */
39
+ /* Let parent xl:items-center handle the centering */
40
+ }
41
+ }
42
+
36
43
@media screen and (min-width : 1600px ) {
37
44
aside .toc .sidebar {
38
45
flex-basis : var (--toc-width--widescreen );
39
46
}
47
+
48
+ main {
49
+ max-width : calc (var (--doc-max-width--desktop ) + var (--toc-width--widescreen )); /* Article + wider TOC */
50
+ }
40
51
}
Original file line number Diff line number Diff line change 1
- <main class =" article w-fit-content max-w-screen" >
1
+ <main class =" article w-full max-w-screen" >
2
2
{{> article-toolbar }}
3
3
<div class =" flex flex-col lg:flex-row w-full" >
4
4
{{ #if (eq page.layout ' 404' )}}
You can’t perform that action at this time.
0 commit comments