diff --git a/aio/src/styles/2-modules/_heading-anchors.scss b/aio/src/styles/2-modules/_heading-anchors.scss index 704691c6e2..e3a169fae4 100644 --- a/aio/src/styles/2-modules/_heading-anchors.scss +++ b/aio/src/styles/2-modules/_heading-anchors.scss @@ -1,48 +1,18 @@ .sidenav-content { h1, h2, h3, h4, h5, h6 { - &.no-anchor .header-link { - display: none; - } - .header-link { - box-sizing: border-box; color: $mediumgray; - display: inline-block; - margin-left: -42px; - padding: 0 8px; + margin-left: 8px; text-decoration: none; user-select: none; - vertical-align: middle; visibility: hidden; - width: 40px; - - @media (max-width: 600px) { - float: right; - margin-left: 0; - } + display: inline-block; + vertical-align: text-top; } &:hover .header-link { visibility: visible; } } - - .l-sub-section { - h1, h2, h3, h4, h5, h6 { - a { - padding-right: 64px; - margin-left: -74px; - } - } - } - - .alert { - h1, h2, h3, h4, h5, h6 { - a { - padding-right: 80px; - margin-left: -90px; - } - } - } } diff --git a/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.js b/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.js index 7daa72623e..27e1117cc2 100644 --- a/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.js +++ b/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.js @@ -20,7 +20,7 @@ const hasClass = (node, cls) => { const link = options => tree => visit(tree, node => { if (is(node, HEADINGS) && has(node, 'id') && !hasClass(node, NO_ANCHOR_CLASS)) { - node.children.unshift({ + node.children.push({ type: 'element', tagName: 'a', properties: Object.assign(clone(options.properties), {href: `#${node.properties.id}`}), diff --git a/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.spec.js b/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.spec.js index 05ac0a8dc5..4b22faae43 100644 --- a/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.spec.js +++ b/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.spec.js @@ -20,9 +20,9 @@ describe('autolink-headings postprocessor', () => {

Heading with encoded chars &

`; const processedContent = ` -

Heading 1

-

Heading with bold

-

Heading with encoded chars &

+

Heading 1

+

Heading with bold

+

Heading with encoded chars &

`; const docs = [{docType: 'a', renderedContent: originalContent}]; diff --git a/aio/tools/transforms/templates/api/base.template.html b/aio/tools/transforms/templates/api/base.template.html index df0c1279bd..14f2edfaf7 100644 --- a/aio/tools/transforms/templates/api/base.template.html +++ b/aio/tools/transforms/templates/api/base.template.html @@ -30,9 +30,7 @@ {% if doc.experimental !== undefined %}{% endif %} {% if doc.stable !== undefined %}{% endif %} -

- {$ doc.name $} -

+

{$ doc.name $}

{$ version $}