-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
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
[Feature Request] More :data[condition] selectors? #197
Comments
You can use |
Is there some way to check for a |
edit: Though that will be the same as |
This check for an empty array doesn't seem to work: <?php
require "vendor/autoload.php";
$xml = '<div>This is the foo message.</div>';
$tss = 'div:data[foo!=""] { content: "condition true"; }';
$tpl = new Transphporm\Builder($xml, $tss);
$data['foo'] = [];
echo $tpl->output($data)->body . PHP_EOL; I expected the output to be |
But it is true that empty array |
Transphporm uses != internally instead of !== |
Would it be possible and desirable to add a few more conditional operators to the
:data[condition]
selectors, possibly modeling the syntax on other CSS attribute selectors? For example, I would find the following operations very helpful (chosen syntax is completely arbitrary and repurposed from CSS):key1
:The text was updated successfully, but these errors were encountered: