diff --git a/src/lib/Sidenote.svelte b/src/lib/Sidenote.svelte index b1d6296..9191f0c 100644 --- a/src/lib/Sidenote.svelte +++ b/src/lib/Sidenote.svelte @@ -23,9 +23,12 @@ &:before { content: counter(sidenote) " "; - position: relative; + /* absolute positioning puts it at the top-left corner of the sidenote */ + position: absolute; + /* translate moves it out to the left (and just a touch up to mimic the superscript efect) + -100% refers to the width of the element, so it pushes it out further if necessary (i.e. two digits instead of one) */ + transform: translate(calc(-100% - 0.2rem), -0.15rem); font-size: 0.75rem; - bottom: 0.2rem; color: #8c0606; } }