mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
[PR #570] [MERGED] Add CSS to make top doc box have a fade, rather than hard cutoff #623
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/570
Author: @thomaspurchas
Created: 7/7/2024
Status: ✅ Merged
Merged: 7/8/2024
Merged by: @holzensp
Base:
main← Head:improved-doc-box📝 Commits (1)
dd6cd05Add CSS to make top doc box have a fade, rather than hard cutoff📊 Changes
2 files changed (+28 additions, -0 deletions)
View changed files
📝
pkl-doc/src/main/resources/org/pkl/doc/styles/pkldoc.css(+14 -0)📝
pkl-doc/src/test/files/DocGeneratorTest/output/styles/pkldoc.css(+14 -0)📄 Description
The current hard cutoff in the docs often results in people not realising that the doc box can be expanded, and often resulting in confusion because the most helpful examples are often in the module doc box.
This change uses some simple CSS tweaks to replace the hard cut-off with a visualfade, so it's obvious that there's content hidden out of view. Doing this required removing the CSS transition, as it hard to correctly transition the height property of CSS element of unknown target height. But the improved discoverablility of the doc content seems like a worthwhile tradeoff.
Before:

After:

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.