Skip to content

Legacy floating clearfix solution prevents sticky positioning #1361

@mfranzke

Description

@mfranzke

I am using Pattern Lab Node v5.15.0 on Mac, with Node v12.13.1, using a Vanilla Edition.

Expected Behavior

Defining position:sticky on a component should correctly work on the pattern overview / view all page.

Actual Behavior

Defining position:sticky on components or UI parts doesn't work on the pattern overview / view all page.

The reason for this is an older clearfix on the main pattern lab tag.

Steps to Reproduce

To reproduce the problem on the hosted pattern lab, instead of defining it on one of the simple components you could use UI parts instead, e.g. integrate the following CSS in your WebDeveloper tools to reproduce the problem:

.pl-c-pattern__header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: white;
}

If you now deactivate the following declaration, everything works fine, and the components headlines get positioned sticky:

.pl-c-main {
    overflow-x: hidden;
}

Instead you could as well use the following preview, that even already includes the implemented solution out of the related pull request #1362: https://deploy-preview-1362--patternlab-handlebars-preview.netlify.app/?p=all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions