Skip to content

Commit

Permalink
Merge pull request #3852 from nextcloud/backport/3847/stable25
Browse files Browse the repository at this point in the history
[stable25] Shrink heading anchor links to `1em`, fixes links in headings
  • Loading branch information
max-nextcloud authored Feb 28, 2023
2 parents bae4cd4 + 886fd3a commit 78b2a3d
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 24 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

11 changes: 2 additions & 9 deletions src/nodes/Heading/HeadingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ div.ProseMirror {
h1,h2,h3,h4,h5,h6 {
position: relative;
.heading-anchor[contenteditable="false"] {
// Shrink clickable area of anchor permalinks to not overlay the heading
width: 1em;
opacity: 0;
padding: 0;
left: -1em;
Expand All @@ -110,14 +112,5 @@ div.ProseMirror {
outline: none;
}
}
// Shrink clickable area of anchor permalinks while editing
&[contenteditable="true"] {
h1,h2,h3,h4,h5,h6 {
.heading-anchor {
width: 1em;
}
}
}
}
</style>

0 comments on commit 78b2a3d

Please sign in to comment.