Skip to content

Commit

Permalink
make the button group be able to exceed the right margin
Browse files Browse the repository at this point in the history
  • Loading branch information
sorawee committed Dec 20, 2023
1 parent b681f3f commit 60d2bfb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 6 additions & 4 deletions scribble-lib/scribble/html-render.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,12 @@
[title "Link here"])
"🔗"))])
,@(if (and src taglet)
'(" "
(a ([class "heading-source"]
[title "Internal Scribble link and Scribble source"]) ""))
'()))))])
(list '(a ([class "heading-source"]
[title "Internal Scribble link and Scribble source"]) ""))
'())
;; this is a dummy node so that the line height of heading-anchor
;; and heading-source are correct (even when their font size is not 100%)
(span ([style "visibility: hidden"]) " "))))])
,@(let ([auths (extract-authors d)])
(if (null? auths)
null
Expand Down
9 changes: 7 additions & 2 deletions scribble-lib/scribble/scribble.css
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,19 @@ ol ol ol ol { list-style-type: upper-alpha; }

/* Hide the button group by default, but show them on hovering the heading title */
.button-group {
padding-left: 0.3em;
visibility: hidden;
padding: 0 0.25em;
position: absolute;
}
.heading:hover > .button-group {
visibility: visible;
}

.button-group a, .button-group a:hover {
.button-group > a {
margin: 0 0.25em;
}

.button-group > a, .button-group > a:hover {
text-decoration: none;
}

Expand Down

0 comments on commit 60d2bfb

Please sign in to comment.