Skip to content
Snippets Groups Projects
Verified Commit fdc45b1c authored by Lars Frost's avatar Lars Frost
Browse files

Improve underline on links with code content

parent b736e96d
Branches main
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ show heading.where(level: 2): set block(above: 2.0em, below: 0.5em)
show link: it => {
set text(fill: blue)
underline(it)
underline(it, offset: 1.2pt)
}
set heading(numbering: "1.1")
......@@ -26,14 +26,10 @@ codly()
show table.header: strong
show raw.where(block: false): r => {
let e = 0.25em
let w = 0.25em
let h = 0.4em
let f = "DejaVu Sans Mono" // I think this is the default mono font. See https://github.com/typst/typst/issues/2870
// highlight(fill: gray, radius: 3pt, extent: e, {
// h(e)
// text(font: f, r)
// h(e)
// })
box(inset: (x: e, y: e), fill: highlightBgColor, radius: 3pt, baseline: e, text(font: f, r))
box(inset: (top: 0.2em, x: w, bottom: h), fill: highlightBgColor, radius: 3pt, baseline: h, text(font: f, r))
}
show figure.caption: it => block({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment