Skip to content

Pushup Element: CSS selector works with IDs but not with class names #2

@porg

Description

@porg

Reproduction

  • Create a page with these block setup
    • Columns block
      • Left column
        • A few paragraph blocks. In total longer than the Image height in the right column.
      • Right column:
        • Sticky block (wrapping the Gutenslider block)
          • Image block wrapped within Sticky block
  • Headings block
    • Acts as the pushup block
    • Has ID #media-text-block (via Advanced > HTML Anchor) and class .wp-block-heading in the HTML output
  • Other blocks follow

Observation (possibly bug)

  • Sticky block → Pushup element
    • ✅ Setting a CSS ID #media-text-block works
    • ❌ Setting a CSS class .wp-block-heading fails to select the pushup element
      • This puzzles me a bit, because the hint text of "Pushup element" says e.g. '#footer', '.widget-bottom', etc. which gave me the impression that both IDs and classnames are allowed to select the pushup element.

Screen Recording

WordPress.Sticky.Block.Pushup.Element.can.be.selected.with.ID.but.not.with.CSS.class.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions