Open cj-clx opened 4 years ago
Note 1
Strangely, this does work:
<?php
require "vendor/autoload.php";
$tss = <<<TSS
#list-claims-form:attr(action):data[input.alternate!="alternate"] {
content: "/list-claims";
}
/*
#list-claims-form:attr(action):data[input.alternate="alternate"] {
content: "/list-claims/alternate";
}
*/
#list-claims-form:data[input.alternate="alternate"]:attr(action) {
content: "/list-claims/alternate";
}
TSS;
$xml = '<form id="list-claims-form" action="FOOBAR">';
$data = [];
$data["input"] = [];
$template = new Transphporm\Builder($xml, $tss);
$output = $template->output($data)->body;
echo $output . PHP_EOL;
That is, the difference is this (in the false side of the branch):
#list-claims-form:attr(action):data[input.alternate="alternate"] { }
Versus this:
#list-claims-form:data[input.alternate="alternate"]:attr(action) { }
Is the failing syntax perhaps just plain wrong? Does the attr()
specifier have to come after the data[]
specifier all the time, perhaps?
Somewhere between the 1.4 release from last November and the current head of dev-master, this stopped working:
Expected output:
Actual output: