Skip to content

#name:attr():data[var="val"] {} fails #230

Description

@cj-clx

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions