Skip to content

Christopher James Willcock

Enjoy Kaizen

Month: June 2018

How Blogs Broke the Web

How the Blog Broke the Web (
All thanks to a quirky bit of software produced to alleviate the pain of a tiny subset of a very small audience.



Preserve combinators that are not surrounded by white space by cjwillcock Β· Pull Request #14 Β· ThomasWeinert/PhpCss (GitHub)
I found with selectors that include a pseudo-class followed by a combinator (other than descendant combinator), with no space in between those two tokens,, such as "a:hover>span", the ...

One more little contribution to the useful PhpCss selector parser by Thomas Weinert. In this case, the regular expressions were greedily including combinators in pseudo-class literals, instead of seeing the end of the token.

Before: it saw a:hover>span and errored, saying “there is no such pseudo-class as :hover>span.”

After: it sees a:hover>span and putters along happily with element a, pseudo-class :hover, child combinator >, and element span.