Skip to content

Support CSS3 calc() #79

Closed
Closed
@mikkorantalainen

Description

@mikkorantalainen

Following document throws Sabberworm\CSS\Parsing\UnexpectedTokenException with message Identifier expected. Got “+ 20p”. This is expected to be valid CSS document:

body
{
    border-top: solid green 0em;
    border-top-width: calc(1em + 20px);
}

The parser is initialized like this:

$settings = Sabberworm\CSS\Settings::create();
$settings->beStrict();
$parser = new Sabberworm\CSS\Parser($css, $settings);

I think Parser::parseValue() would need to be modified but I have no idea how to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions