Skip to content

Linter fails with @import ampersand in url #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yt-topicus opened this issue Apr 14, 2025 · 2 comments · Fixed by #113
Closed

Linter fails with @import ampersand in url #112

yt-topicus opened this issue Apr 14, 2025 · 2 comments · Fixed by #113
Assignees
Labels

Comments

@yt-topicus
Copy link
Contributor

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.

@yt-topicus yt-topicus changed the title Linter fails with ampersand in url Linter fails with @import ampersand in url Apr 14, 2025
@neilime neilime linked a pull request Apr 14, 2025 that will close this issue
@neilime
Copy link
Owner

neilime commented Apr 14, 2025

Hi @yt-topicus, it should be fixed in https://github.com/neilime/php-css-lint/releases/tag/v4.1.1

@neilime neilime added the bug label Apr 14, 2025
@neilime neilime self-assigned this Apr 14, 2025
@yt-topicus
Copy link
Contributor Author

Thank you @neilime, it works. Could you also take a look at #104 (PR #105)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants