Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

refactor(toc): move layout styles out of component and into parents #323

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/pages/component-viewer/component-viewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ app-component-viewer {

table-of-contents {
top: 35px;
position: sticky;

// Reposition on top of content on small screens and remove
// sticky positioning
Expand Down
1 change: 1 addition & 0 deletions src/app/pages/guide-viewer/guide-viewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ $guide-content-margin-side-xs: 15px;

table-of-contents {
top: 35px;
position: sticky;

// Reposition on top of content on small screens and remove
// sticky positioning
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/doc-viewer/header-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {Router} from '@angular/router';
<a
title="Link to this heading"
[attr.aria-describedby]="example"
class="docs-markdown-a docs-header-link"
class="docs-markdown-a"
aria-label="Link to this heading"
[href]="url">
<mat-icon>link</mat-icon>
Expand Down
8 changes: 1 addition & 7 deletions src/app/shared/table-of-contents/table-of-contents.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
:host {
font-size: 13px;
width: 19%;
position: sticky;
top: 0;
padding-left: 20px;
box-sizing: border-box;
}

.docs-toc-container {
box-sizing: border-box;
padding: 5px 0 10px 12px;
width: 100%;
}

.docs-toc-heading {
margin: 0;
padding: 0;
font-size: 13px;
font-weight: bold;
}
Expand All @@ -26,7 +21,6 @@ a {
text-decoration: none;
display: block;
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
}

Expand Down