Skip to content

Commit

Permalink
style: hr (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Oct 18, 2023
1 parent 40b516a commit 963449a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
@import "./fonts";
@import "./docusaurus";
@import "./buttons";
@import "./hr";
10 changes: 10 additions & 0 deletions src/css/docusaurus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@ a.card {
}
}
}

.markdown > pre, .markdown > ul, .markdown > p {
&:has(+ hr) {
margin-bottom: 0 !important;
}

& + hr {
margin-top: 0;
}
}
23 changes: 23 additions & 0 deletions src/css/hr.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
hr {
height: 3em;
margin: var(--ifm-hr-margin-vertical) auto;
overflow: visible;
position: relative;
display: block;
border: none;
outline: none;
background-color: unset;

&:before {
content: "\23FA\23FA\23FA";
display: inline-block;
color: var(--ifm-hr-background-color);
position: absolute;
top: 75%;
left: 50%;
transform: translate(0, -50%);
margin-left: 0.6em;
letter-spacing: 0.6em;
font-size: 0.8rem;
}
}

0 comments on commit 963449a

Please sign in to comment.