Skip to content

Linter fails with @import ampersand in url #112

Closed
@yt-topicus

Description

@yt-topicus

Describe the bug

The following CSS fails

@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
===========================================================

  ____  _              ____ ____ ____    _     _       _
 |  _ \| |__  _ __    / ___/ ___/ ___|  | |   (_)_ __ | |_
 | |_) | '_ \| '_ \  | |   \___ \___ \  | |   | | '_ \| __|
 |  __/| | | | |_) | | |___ ___) |__) | | |___| | | | | |_
 |_|   |_| |_| .__/   \____|____/____/  |_____|_|_| |_|\__|
             |_|

===========================================================

# Lint CSS string...
 => CSS string is not valid:

    - Unexpected selector token "&" (line: 1, char: 62)
    - Unterminated "selector" (line: 1, char: 77)

To Reproduce
Steps to reproduce the behavior:

$ vendor/bin/php-css-lint "@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');"

Expected behavior
No error

Desktop (please complete the following information):

  • OS: WSL2
  • Version: v4.1.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions