Skip to content

Tokenizing fails when font property line height value is set from custom property #92

@lauriii

Description

@lauriii
  • Operating System (or Browser): MacOS
  • Node Version: 8.10.0
  • postcss-values-parser Version: 3.0.5

How Do We Reproduce?

Example of failing CSS:

font: 1em/var(--line-height);

I created a failing test for this: lauriii@d0bbbbc

I added two test scenarios. It seems like 1em / var(--line-height); works but 1em/var(--line-height); doesn't.

This might be caused because of a bug in an upstream package. I filed an issue there but they suggested that this package shouldn't use the PostCSS core tokenizer. Upstream issue: postcss/postcss#1298.

Expected Behavior

1em should be tokenized into number and var should be tokenized into a function.

Actual Behavior

This is tokenized into a single function with name 1em/var.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions