mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(docs-infra): fix the main content layout (#44282)
Fix the layout of the main docs content on both small and large screens. On small screens, content could overlap with the floating ToC, while on large screens the content was not centered correctly (see screenshots below). (For reference, this was accidentally broken in #44236.) **Before:** -  -  **After:** -  -  PR Close #44282
This commit is contained in:
parent
8077695167
commit
ef140a76d9
2 changed files with 21 additions and 13 deletions
|
|
@ -56,17 +56,21 @@
|
|||
</div>
|
||||
</mat-sidenav>
|
||||
|
||||
<main class="sidenav-content" [id]="pageId" role="main">
|
||||
<div id="main-content" tabindex="-1"></div>
|
||||
<aio-mode-banner [mode]="deployment.mode" [version]="versionInfo"></aio-mode-banner>
|
||||
<aio-doc-viewer [class.no-animations]="disableAnimations" [doc]="currentDocument" (docReady)="onDocReady()" (docRemoved)="onDocRemoved()" (docInserted)="onDocInserted()" (docRendered)="onDocRendered()">
|
||||
</aio-doc-viewer>
|
||||
<aio-dt *ngIf="dtOn" [(doc)]="currentDocument"></aio-dt>
|
||||
</main>
|
||||
<section class="sidenav-content-container">
|
||||
|
||||
<div *ngIf="hasFloatingToc" class="toc-container no-print" [style.max-height.px]="tocMaxHeight" (wheel)="restrainScrolling($event)">
|
||||
<aio-lazy-ce selector="aio-toc"></aio-lazy-ce>
|
||||
</div>
|
||||
<main class="sidenav-content" [id]="pageId" role="main">
|
||||
<div id="main-content" tabindex="-1"></div>
|
||||
<aio-mode-banner [mode]="deployment.mode" [version]="versionInfo"></aio-mode-banner>
|
||||
<aio-doc-viewer [class.no-animations]="disableAnimations" [doc]="currentDocument" (docReady)="onDocReady()" (docRemoved)="onDocRemoved()" (docInserted)="onDocInserted()" (docRendered)="onDocRendered()">
|
||||
</aio-doc-viewer>
|
||||
<aio-dt *ngIf="dtOn" [(doc)]="currentDocument"></aio-dt>
|
||||
</main>
|
||||
|
||||
<div *ngIf="hasFloatingToc" class="toc-container no-print" [style.max-height.px]="tocMaxHeight" (wheel)="restrainScrolling($event)">
|
||||
<aio-lazy-ce selector="aio-toc"></aio-lazy-ce>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<footer class="no-print">
|
||||
<aio-footer [nodes]="footerNodes" [versionInfo]="versionInfo"></aio-footer>
|
||||
|
|
|
|||
|
|
@ -13,13 +13,17 @@ mat-sidenav-container.sidenav-container {
|
|||
transform: none;
|
||||
|
||||
&.has-floating-toc {
|
||||
.sidenav-content {
|
||||
margin-right: 18vw;
|
||||
.sidenav-content-container {
|
||||
padding-right: 18vw;
|
||||
}
|
||||
}
|
||||
|
||||
.sidenav-content {
|
||||
.sidenav-content-container {
|
||||
height: auto;
|
||||
|
||||
.sidenav-content {
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
mat-sidenav.sidenav {
|
||||
|
|
|
|||
Loading…
Reference in a new issue