Fix mdBook rendering issues with nested sections

This commit is contained in:
Hugh Ratsch
2025-03-02 11:28:31 -06:00
parent e4ba16bfc7
commit be1c0d3dc9
9 changed files with 246 additions and 101 deletions
+87
View File
@@ -0,0 +1,87 @@
/* Custom styling for IT Learning Notes */
/* Ensure all sections are properly visible */
.section {
display: block !important;
visibility: visible !important;
opacity: 1 !important;
}
/* Improve nested section visibility */
.chapter li.chapter-item {
margin-left: 1em;
}
.chapter li.chapter-item.expanded {
margin-left: 0;
}
/* Better styling for scenario headers */
h2 {
margin-top: 2em;
border-bottom: 1px solid #ddd;
padding-bottom: 0.3em;
}
/* Make anchors more reliable */
h2:before, h3:before {
content: "";
display: block;
height: 70px;
margin-top: -70px;
visibility: hidden;
}
/* Styling for code blocks */
pre {
background-color: #f5f5f5;
border-radius: 4px;
padding: 1em;
overflow-x: auto;
}
/* Improve table styling */
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
table, th, td {
border: 1px solid #ddd;
}
th, td {
padding: 12px;
text-align: left;
}
th {
background-color: #f5f5f5;
}
/* Style for tags */
.tag {
background-color: #f0f0f0;
border-radius: 4px;
padding: 3px 6px;
font-size: 0.85em;
font-family: monospace;
}
/* Ensure content is visible */
.content {
display: block !important;
}
/* Fix for potentially hidden elements */
.hidden {
display: block !important;
visibility: visible !important;
}
/* Ensure chapters don't disappear */
.chapter {
display: block !important;
visibility: visible !important;
}