Skip to content

Fix timeline section hiding in print output on mobile#126

Merged
vincentmakes merged 1 commit into
mainfrom
claude/fix-hidden-print-sections-DcXTx
Apr 20, 2026
Merged

Fix timeline section hiding in print output on mobile#126
vincentmakes merged 1 commit into
mainfrom
claude/fix-hidden-print-sections-DcXTx

Conversation

@vincentmakes

Copy link
Copy Markdown
Owner

Description

Fixes a CSS specificity bug where hiding the timeline section via the section-visibility toggle (.is-hidden class) was not being respected in print output on mobile viewports. The timeline would still appear as a faded, dashed-border block instead of being completely omitted.

The root cause was that the mobile print override rule #section-timeline:not(.hidden-print) had higher specificity than the generic .is-hidden { display: none !important; } rule, causing the override to win and re-enable the timeline even when the user had hidden it.

The fix adds :not(.is-hidden) to both mobile print override selectors, ensuring that genuinely hidden timelines are absent from print output on all viewport widths. Hiding non-timeline sections was already working correctly; this bug was specific to the timeline because it's the only section with a mobile-print re-enable rule.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (changes to docs only — no version bump needed)
  • Translation (new or updated language files)
  • Refactoring (no functional changes)

Checklist

Required for all code changes

  • I have tested my changes locally (npm test passes)
  • Version has been bumped in all 3 files (package.json, package-lock.json, version.json)
  • CHANGELOG.md has been updated with a new entry under the correct version

If adding or changing user-visible strings

  • N/A — no user-visible strings changed

If documentation-only change

  • N/A — not a documentation-only change

https://claude.ai/code/session_01NjtKez7wnZgJrBfDnioPrw

Hiding the timeline section via the section-visibility toggle (.is-hidden)
was supposed to omit it from print, but it rendered as a dimmed, dashed
box. The mobile-print re-enable rule used
#section-timeline:not(.hidden-print) — higher specificity than the
generic .is-hidden { display: none !important } rule — so it won in print
and the .is-hidden opacity styling from admin.css leaked through.

Extend the :not() guard to also exclude .is-hidden so genuinely hidden
timelines are absent from print on every viewport width.

https://claude.ai/code/session_01NjtKez7wnZgJrBfDnioPrw
@vincentmakes vincentmakes merged commit d26cc3f into main Apr 20, 2026
3 checks passed
@vincentmakes vincentmakes deleted the claude/fix-hidden-print-sections-DcXTx branch April 20, 2026 03:23
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.

2 participants