Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Add anchor to h4
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanLund committed Oct 21, 2019
1 parent 863adec commit 12dc910
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demo/js/interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@
};

var addAchorsToHeadings = function () {
var headings = document.querySelectorAll('h2[id], h3[id]');
var headings = document.querySelectorAll('h2[id], h3[id], h4[id]');

var interval = setInterval(function () {
headings = document.querySelectorAll('h2[id], h3[id]');
headings = document.querySelectorAll('h2[id], h3[id], h4[id]');
if (headings.length) {
createAchors(headings);
clearInterval(interval);
Expand Down
2 changes: 1 addition & 1 deletion demo/styles/app.css

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion demo/styles/src/reference.less
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,17 @@ ol {
list-style-type: decimal;
}

h3 {
h3,
h4 {
display: inline-block;
position: relative;
}

h4 {
padding: .675em 0 .375em;
margin: 0;
}

.api-status,
span.api-status {
font-size: 12px;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kentico-kontent-docs-redoc",
"version": "3.0.1",
"version": "3.0.2",
"description": "ReDoc",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion src/common-elements/linkify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const linkifyMixin = className => css`
h2:hover
> .linkify__StyledShareLink::before,
.linkify__StyledShareLink:hover::before,
h3:hover > .linkify__StyledShareLink::before {
h3:hover > .linkify__StyledShareLink::before,
h4:hover > .linkify__StyledShareLink::before {
visibility: visible;
}
`;
Expand Down

0 comments on commit 12dc910

Please sign in to comment.