As reported in https://github.com/wikimedia/less.php/issues/78#issuecomment-1438271958. I made a very rough "fix": - https://github.com/Gappa/less.php/commit/d255214b3de41c262d450c29efdcee05391ac4f8 It kind of works, but hijacks most of the code for media queries, upon which container queries are based, so it makes at least some sense :)