MacDownApp / MacDownApp/macdown
Adding MathJax increases first element's top margin (Github themes)
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
It seems that when MathJax is enabled, this selector in GitHub2 (and a similar one in GitHub) stop working:
``` css
body > *:first-child {
margin-top: 0 !important; }
```
So the first heading of the document ends up with excess top margin. I'm guessing this is because MathJax script tags are being injected right after `` before the actual document. Perhaps it can be loaded in the `` instead?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the GitHub2 and GitHub theme CSS rules containing `body > *:first-child`, then check how MathJax script tags are inserted relative to ``. Confirm the fix by rendering a document with MathJax enabled and verifying that its first heading has no excess top margin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100