Skip to content

Regression in v4.0.38: Section padding not respected with flex + align-items:center layout #4736

@Enashka

Description

@Enashka

Summary

Version 4.0.38 introduced a regression that breaks section padding when using display: flex with align-items: center. Content is incorrectly shifted to the left, ignoring horizontal padding.

Affected Version

  • fullpage.js 4.0.38 and later
  • Working version: 4.0.37

Steps to Reproduce

  1. Create sections with this CSS:
.section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 7rem;
}

.slide-content {
    max-width: 1200px;
    width: 100%;
}
  1. Initialize fullpage.js with basic config:
new fullpage('#fullpage', {
    verticalCentered: true,
    paddingTop: '0',
    paddingBottom: '0',
    // other options...
});
  1. Observe that the left padding (7rem) is not applied - content touches the left edge

Expected Behavior

Content should be centered within the padded section, respecting the 7rem left/right padding on both desktop and mobile views.

Actual Behavior

In v4.0.38+, the padding-left is ignored and content is shifted to the left edge of the section.

Related to

This appears related to the scrollOverflow width fix in v4.0.38 (#4717), which may have inadvertently affected how padding is calculated for flex-based centered layouts.

Environment

  • Browser: Chrome/Firefox/Safari (all affected)
  • fullpage.js versions: 4.0.38, 4.0.39, 4.0.40 (all broken)
  • Regression introduced: 4.0.38
  • Last working version: 4.0.37

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions