Skip to content

URL parameters are being parsed into functional groups, when they should be ignored. #117

@robert-j-webb

Description

@robert-j-webb

Expected Behavior / Situation

In postcss-values-parser 2.0.1 in loose mode:

background-image: url(https://prettier-fonts.com/css?family=Prettier+Sans&size=500,400,300,1000,600);

I should get:

 expected: [
        { type: 'func', value: 'url' },
        { type: 'paren', value: '(' },
        { type: 'word', value: "https://prettier-fonts.com/css?family=Prettier+Sans&size=500,400,300,1000,600" },
        { type: 'paren', value: ')' }
      ]

Actual Behavior / Situation

It parses the URL like it's a combination of operators, etc. This only happens in loose mode.

Modification Proposal

In loose mode, do not parse url string values.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions