FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix issues with scrolling and anchors · mcjava-wiki/mcjava-wiki@4a3a4bd · GitHub

Repository navigation

Commit 4a3a4bd

Browse files
committed
Fix issues with scrolling and anchors
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
1 parent 14acba9 commit 4a3a4bd

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

‎css/custom.css‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
src: local('icomoon'), url(../static/fonts/icomoon.ttf) format('truetype');
44
}
55

6+
html{
7+
scroll-behavior:smooth;
8+
scroll-padding-top: 4rem;
9+
}
10+
611
pre[class*="language-"] {
712
position: relative;
813
-webkit-overflow-scrolling: touch;

‎src/components/Article.js‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import styled, { css, up, down } from '@xstyled/styled-components'
22

33
export const Article = styled.article`
4-
.anchor {
5-
margin-left: calc(-1em - 4px);
6-
> svg {
7-
fill: on-background;
8-
width: 1em;
9-
height: 1em;
10-
display: inline;
11-
vertical-align: -15%;
4+
.anchor.before {
5+
position: relative;
6+
left: 25px;
7+
margin-left: -21px;
8+
display: inline-block;
9+
span {
10+
svg {
11+
fill: control-border;
12+
transform: rotate(270deg);
13+
&:hover {
14+
fill: on-background;
15+
}
16+
}
1217
}
1318
}
1419

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL