-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add footnote styles Port the styles from dotcom to Primer. * Create gold-games-tickle.md * disable lints * Nest footnotes within markdown-body Co-authored-by: Jon Rohan <rohan@github.com> * Style footnotes * Add footnotes to docs * Lint * Bump right border Bumps the right border out a bit for symmetry in the :target border style. * Darken text when targeted Co-authored-by: Jon Rohan <rohan@github.com> Co-authored-by: simurai <simurai@github.com>
- Loading branch information
1 parent
b8fe364
commit afac04b
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/css": minor | ||
--- | ||
|
||
Adding footnote styles to markdown-body. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// stylelint-disable selector-max-type | ||
// stylelint-disable selector-max-compound-selectors | ||
|
||
.markdown-body .footnotes { | ||
font-size: $h6-size; | ||
color: var(--color-fg-muted); | ||
border-top: $border; | ||
|
||
ol { | ||
padding-left: $spacer-3; | ||
} | ||
|
||
li { | ||
position: relative; | ||
} | ||
|
||
li:target::before { | ||
position: absolute; | ||
top: -$spacer-2; | ||
right: -$spacer-2; | ||
bottom: -$spacer-2; | ||
left: -$spacer-4; | ||
pointer-events: none; | ||
content: ""; | ||
// stylelint-disable-next-line primer/borders | ||
border: 2px $border-style var(--color-accent-emphasis); | ||
border-radius: $border-radius; | ||
} | ||
|
||
li:target { | ||
color: var(--color-fg-default); | ||
} | ||
|
||
.data-footnote-backref g-emoji { | ||
font-family: monospace; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
@import "./images.scss"; | ||
@import "./code.scss"; | ||
@import "./blob-csv.scss"; | ||
@import "./footnotes.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,4 +93,12 @@ | |
margin-bottom: 0; | ||
} | ||
} | ||
|
||
sup > a::before { | ||
content: "["; | ||
} | ||
|
||
sup > a::after { | ||
content: "]"; | ||
} | ||
} |