MacDownApp / MacDownApp/macdown

Override codeblock height limits in Prism

Open
#275 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

From discussion on Gitter. Currently the Coy theme [limits the height of code blocks](https://github.com/LeaVerou/prism/blob/gh-pages/themes/prism-coy.css#L45) and uses an `overflow-y` to navigate inside it. While this is fine when viewing as HTML, it doesn’t make sense otherwise.

Not sure how we can add the overriding rule automatically just for those cases though. Maybe it would be fine to just override this in _all_ cases? Shouldn’t make much difference anyway, I think?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Prism Coy theme rule in themes/prism-coy.css and locate where MacDown applies code-block styling. Confirm how code blocks are displayed outside HTML, then remove or override the height and overflow restriction so the finished rendering is not constrained by that limit.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.