Skip to content

Fix simple image slider centering and spacing#869

Merged
CySSoO merged 1 commit intomasterfrom
cyssoo/fix-image-centering-in-prettyblock-slider
Jan 29, 2026
Merged

Fix simple image slider centering and spacing#869
CySSoO merged 1 commit intomasterfrom
cyssoo/fix-image-centering-in-prettyblock-slider

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 29, 2026

Motivation

  • Ensure the active image in the Prettyblock "Simple Image" slider is truly centered between the navigation arrows and prevent adjacent images from being visually cut off by increasing item gaps.

Description

  • Updated updateTrackPosition in views/js/everblock-slider.js to account for state.gap when computing the track translateX, so the active item is centered correctly between the arrows by using state.index * (state.itemWidth + state.gap) in the offset calculation.
  • Increased spacing in views/css/everblock.css by changing .ever-slider-track column-gap from 1.5rem to 2rem on desktop and from 1rem to 1.25rem at the tablet breakpoint to reduce image cropping.

Testing

  • Attempted an automated visual check by taking a screenshot with Playwright, but the local server was unreachable and the run failed with net::ERR_EMPTY_RESPONSE.
  • No unit or integration tests were executed.

Codex Task

@CySSoO CySSoO merged commit bd99273 into master Jan 29, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant