Skip to content

Valid CSS class name fails #209

@cxj

Description

@cxj

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;

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