Skip to content

Conversation

@westonruter
Copy link
Collaborator

This PR adds a splice method to allow insert/replace one or more items at an arbitrary point in the list. This compliments #149 which added prepend and replace methods to CSSList.

An example use case for this PR is to extract CSS properties with !important qualifiers as separate rules with higher-specificity selectors. Example usage:

https://github.com/ampproject/amp-wp/blob/c92e129333a8518088a37d47594079b537121d70/includes/sanitizers/class-amp-style-sanitizer.php#L1757-L1762

Also adds PhpDoc to surrounding methods.

Copy link
Collaborator

@sabberworm sabberworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot. LGTM

@sabberworm sabberworm merged commit 3780f73 into MyIntervals:master Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants