Skip to content

Linter fails with @import semicolon in url #116

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 28, 2025 · 2 comments · Fixed by #117
Closed

Linter fails with @import semicolon in url #116

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

Comments

@yt-topicus
Copy link
Contributor

Describe the bug

The following CSS fails

@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');
===========================================================
  ____  _              ____ ____ ____    _     _       _
 |  _ \| |__  _ __    / ___/ ___/ ___|  | |   (_)_ __ | |_
 | |_) | '_ \| '_ \  | |   \___ \___ \  | |   | | '_ \| __|
 |  __/| | | | |_) | | |___ ___) |__) | | |___| | | | | |_
 |_|   |_| |_| .__/   \____|____/____/  |_____|_|_| |_|\__|
             |_|
===========================================================
# Lint CSS string...
 => CSS string is not valid:
    - Unexpected selector token "&" (line: 1, char: 111)
    - Unterminated "selector" (line: 1, char: 126)

To Reproduce

vendor/bin/php-css-lint "@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');"

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: WSL2
  • Version: v4.1.1

Additional context

@neilime neilime self-assigned this May 1, 2025
@neilime neilime added the bug label May 1, 2025
@neilime neilime linked a pull request May 1, 2025 that will close this issue
@neilime neilime reopened this May 1, 2025
@neilime
Copy link
Owner

neilime commented May 1, 2025

Hi @yt-topicus it should be fixed in v4.1.2

@yt-topicus
Copy link
Contributor Author

Hi @yt-topicus it should be fixed in v4.1.2

This works. I've found another bug that the linter does not allow for unicode-range, for which I will create a separate bug report.

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