@@ -488,7 +488,29 @@ td > .xref {
488488 }
489489
490490 /* Prevent page breaks inside paragraphs and common block elements */
491- p , li , blockquote , .alert {
491+ /* Exclude TOC navigation which needs to allow breaks for long lists */
492+ p , blockquote , .alert {
493+ page-break-inside : avoid !important ;
494+ break-inside : avoid !important ;
495+ }
496+
497+ /* Allow page breaks in TOC navigation lists */
498+ .toc ul ,
499+ .toc li ,
500+ .toc .nav ,
501+ .sidetoc ul ,
502+ .sidetoc li {
503+ page-break-inside : auto !important ;
504+ break-inside : auto !important ;
505+ }
506+
507+ /* Keep content list items together, but not TOC */
508+ article ul ,
509+ article ol ,
510+ article li ,
511+ main > ul ,
512+ main > l ,
513+ main > li {
492514 page-break-inside : avoid !important ;
493515 break-inside : avoid !important ;
494516 }
@@ -501,4 +523,67 @@ td > .xref {
501523 pre , code , table {
502524 page-break-inside : avoid;
503525 }
526+
527+ /* Flatten tabs for PDF - show all tab content */
528+ .tabGroup {
529+ border : none !important ;
530+ }
531+
532+ .tabGroup > ul [role = "tablist" ] {
533+ display : none !important ;
534+ }
535+
536+ .tabGroup > section ,
537+ .tabGroup > .tabpanel ,
538+ .tabGroup .tab-pane ,
539+ .tabGroup [role = "tabpanel" ] {
540+ display : block !important ;
541+ visibility : visible !important ;
542+ opacity : 1 !important ;
543+ position : relative !important ;
544+ height : auto !important ;
545+ overflow : visible !important ;
546+ padding : 15px 0 !important ;
547+ border-bottom : 1px solid # ddd !important ;
548+ margin-bottom : 15px !important ;
549+ }
550+
551+ /* Base label styling for tab panels */
552+ .tabGroup > section ::before ,
553+ .tabGroup > .tabpanel ::before ,
554+ .tabGroup [role = "tabpanel" ]::before {
555+ display : block;
556+ font-weight : bold;
557+ font-size : 14px ;
558+ color : # e73c00 ;
559+ margin-bottom : 10px ;
560+ padding : 5px 10px ;
561+ background-color : # f5f5f5 ;
562+ border-left : 3px solid # e73c00 ;
563+ }
564+
565+ /* OS-specific tab labels - scoped to tabGroup */
566+ .tabGroup [id *= "_windows" ]::before { content : "Windows" !important ; }
567+ .tabGroup [id *= "_macos" ]::before { content : "macOS" !important ; }
568+ .tabGroup [id *= "_ubuntu" ]::before { content : "Ubuntu" !important ; }
569+ .tabGroup [id *= "_linux" ]: not ([id *= "_arch" ])::before { content : "Linux" !important ; }
570+ .tabGroup [id $= "_arch" ]::before ,
571+ .tabGroup [id *= "_arch_" ]::before { content : "Arch Linux" !important ; }
572+
573+ /* IDE-specific tab labels - scoped to tabGroup */
574+ .tabGroup [id *= "_vscode" ]::before { content : "Visual Studio Code" !important ; }
575+ .tabGroup [id *= "_rider" ]::before { content : "JetBrains Rider" !important ; }
576+
577+ /* Other common tab labels - scoped to tabGroup */
578+ .tabGroup [id *= "_csharp" ]::before { content : "C#" !important ; }
579+ .tabGroup [id *= "_opengl" ]::before { content : "OpenGL" !important ; }
580+ .tabGroup [id *= "_directx" ]::before { content : "DirectX" !important ; }
581+ .tabGroup [id *= "_desktopgl" ]::before { content : "DesktopGL" !important ; }
582+
583+ /* Remove last border */
584+ .tabGroup > section : last-child ,
585+ .tabGroup > .tabpanel : last-child ,
586+ .tabGroup [role = "tabpanel" ]: last-child {
587+ border-bottom : none !important ;
588+ }
504589}
0 commit comments