robinmetral/website

Weird behavior with footnotes

Closed this issue · 1 comments

  • When a footnote is active after clicking its ref (e.g. #user-content-fn-1), the number (in the numbered list) is not shown and is removed from the list order
  • When a footnote ref is active (e.g. #user-content-fnref-1), it creates a line break before and after the footnote ref

This is caused by CSS injected by the a11y.css extension. It injects the following :target styles that get triggered when clicking either of the footnote links (to the footnotes or to the footnote ref): (source)

/* injected by a11y.css in alt.css:134 */
:target {
  display: block;
  scroll-margin-top: calc(50vh - var(--a11ycss-offset));
}

display: block; removes the list market in the footnotes list because it changes the list item's display value from list-item (spec), and it adds line breaks around the footnote ref because it changes the anchor's display value from inline.

Will raise with the extension authors and close for now