Skip to content

fix: style callouts in wiki PDF download#626

Merged
NagariaHussain merged 1 commit into
frappe:developfrom
NagariaHussain:fix/wiki-pdf-callout-styles
May 15, 2026
Merged

fix: style callouts in wiki PDF download#626
NagariaHussain merged 1 commit into
frappe:developfrom
NagariaHussain:fix/wiki-pdf-callout-styles

Conversation

@NagariaHussain
Copy link
Copy Markdown
Collaborator

@NagariaHussain NagariaHussain commented May 15, 2026

CSS Variables -> Hardcoded colors.

Mirror the public-page callout treatment in the print format so
note/tip/caution/danger callouts render with their colored backgrounds
and tinted icons instead of plain icon + text.

While doing this, inline every `var(--...)` reference as a hex value:
wkhtmltopdf's QtWebKit predates CSS Custom Properties, so all our
existing `var(--gray-*)` declarations were silently dropping too — the
header divider, table borders, blockquote rule, and eyebrow colors
weren't rendering either, not just the new callout colors.

Layout note: the public CSS uses `display: grid` with
`grid-template-columns: auto 1fr`; QtWebKit doesn't support Grid, so
the print format floats the icon left and gives `.callout-body` its
own block formatting context via `overflow: hidden`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Walkthrough

This PR updates the print template for standard wiki documents with two styling improvements for PDF rendering. First, it replaces CSS variable references with fixed hex colors throughout the template—affecting header borders, eyebrow and separator colors, metadata labels, table cells, and blockquotes—to ensure consistent appearance in PDF output. Second, it adds comprehensive callout styling rules to support rendering callout elements (note, tip, caution, danger) in the printed view, including layout structure, typography definitions, and variant-specific color schemes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the main change: adding callout styling to wiki PDF downloads. It accurately reflects the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NagariaHussain NagariaHussain merged commit 76f63d5 into frappe:develop May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant