Skip to content

Automatically fit comment preview height - #7189

Merged
fregante merged 8 commits into
refined-github:mainfrom
pgimalac:pgimalac/fit-rendered-markdown
Jan 10, 2024
Merged

fregante merged 8 commits into
refined-github:mainfrom
pgimalac:pgimalac/fit-rendered-markdown

Conversation

@pgimalac

Copy link
Copy Markdown
Contributor

Fix #7187.

Rendered markdown div automatically fit their content, but for some reason Github explicitly sets the min-height style property to the height of the input textarea.
Simply overriding the min-height to 0 fixes this bug.

Affects any div that renders markdown.

Screenshot

Input Original Fixed
image image image

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I think we can set it to something like 2em to make sure it's never collapsed to 0 (which would probably look broken)

You can ignore the CI failure

@fregante fregante mentioned this pull request Dec 28, 2023
7 of 11 tasks
@pgimalac

Copy link
Copy Markdown
Contributor Author

Done !

@fregante fregante changed the title Fit rendered markdown div to its content Automatically fit comment preview height Jan 10, 2024
@fregante
fregante enabled auto-merge (squash) January 10, 2024 08:28
@fregante
fregante merged commit 410d5bf into refined-github:main Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Reduce markdown preview height to exact rendered size

2 participants