Skip to content

fix: center image captions alongside the total counter - #242

Merged
infeng merged 1 commit into
masterfrom
maintenance/issue-139-caption-centering
Sep 9, 2026
Merged

fix: center image captions alongside the total counter#242
infeng merged 1 commit into
masterfrom
maintenance/issue-139-caption-centering

Conversation

@infeng

@infeng infeng commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Enabling showTotal shifts the image caption left because the floated counter reduces the centered text area. This is visible in both modal and inline viewers (about 21.55 px with the demo counter).

Group the caption and dimensions in a flexible column, with equal space on either side matching the counter width. Long captions and counters wrap without overlapping; a counter-only row retains its height. The public props are unchanged.

Validation:

  • npm run verify passed: 42 tests, lint, library/demo/SSR builds, export/hydration/multipart checks, zero-critical audit gates, and package dry run.
  • Chrome 149 geometry checks at 1280/640/360 px and in a 600 px inline container: caption offset changed from -21.55 px to 0 px.
  • Checked long caption/localized-length counter at 360 px, showTotal/noImgDetails toggles, navigation counter updates, and an empty caption with a visible counter.

Related to #139. The report remains open for release tracking.

@infeng
infeng merged commit ee3ea1f into master Sep 9, 2026
2 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