The first test works, and the latter fails. It appears to be because of an embedded digit before a hyphen. However, CSS grammar says this is a valid class name.
<?php
require "vendor/autoload.php";
$xml = '<span class="dx-good">FAILS</span>';
$tss = 'span.dx-good { content: "This works"; }';
$template = new Transphporm\Builder($xml, $tss);
$output = $template->output()->body;
echo $output . PHP_EOL;
$xml = '<span class="d1-fail">FAILS</span>';
$tss = 'span.d1-fail{ content: "This works"; }';
$template = new Transphporm\Builder($xml, $tss);
$output = $template->output()->body;
echo $output . PHP_EOL;
The first test works, and the latter fails. It appears to be because of an embedded digit before a hyphen. However, CSS grammar says this is a valid class name.