Automattic / Automattic/jetpack

Infinite scroll: should support multiple wrapper classes

Open
#3,659 2 comments 1 reaction 0 assignees View on GitHub
[Feature] Infinite Scroll [Status] In Progress Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

At present, all CSS classes passed into infinite scroll go through a regex filter that strips out spaces, meaning you can only provide one class.

In the case of 'wrapper', it makes sense to allow multiple classes as many themes using CSS frameworks will need to use responsive classes on the content that's pulled in on scroll.

Taking a look at the places $css_pattern is used, there is no reason why we shouldn't just modify the $css_pattern to support spaces.

Contributor guide

Open the contributing guide

Research direction

Search the infinite-scroll implementation for $css_pattern and inspect each place where the filtered wrapper class is used. Confirm how wrapper values are validated, then update the behavior so space-separated classes are accepted while existing single-class input still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.