We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Somewhere between the 1.4 release from last November and the current head of dev-master, this stopped working:
<?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"; } 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;
Expected output:
<form id="list-claims-form" action="/list-claims"></form>
Actual output:
<form id="list-claims-form" action="/list-claims/alternate"></form>
The text was updated successfully, but these errors were encountered:
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) { }
Sorry, something went wrong.
Is the failing syntax perhaps just plain wrong? Does the attr() specifier have to come after the data[] specifier all the time, perhaps?
attr()
data[]
No branches or pull requests
Somewhere between the 1.4 release from last November and the current head of dev-master, this stopped working:
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: