Skip to content

Commit

Permalink
Tweak positioning of back to top on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Mar 26, 2022
1 parent d396718 commit 8d3ebc9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/furo/assets/styles/_scaffold.sass
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ article
display: none
position: fixed
left: 0
top: calc(var(--header-height) + 0.5rem)
top: 1rem
padding: 0.5rem
padding-right: 0.75rem
border-radius: 1rem
Expand All @@ -301,14 +301,14 @@ article
background: var(--color-background-primary)
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), #6b728080 0px 0px 1px 0px

z-index: 1
z-index: 10

margin-left: 50%
transform: translateX(-50%)
svg
height: 1rem
width: 1rem
fill: var(--color-foreground-primary)
fill: currentColor
display: inline-block

span
Expand Down Expand Up @@ -385,6 +385,10 @@ article
:target
scroll-margin-top: var(--header-height)

// Show back-to-top below the header
.back-to-top
top: calc(var(--header-height) + 0.5rem)

// Center the page, and accommodate for the header.
.page
flex-direction: column
Expand Down

0 comments on commit 8d3ebc9

Please sign in to comment.