Skip to content

Linter fails with font-display and unicode-range #118

@yt-topicus

Description

@yt-topicus

Describe the bug

The following CSS fails

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/poppins/v23/pxiEyp8kv8JHgFVrJJbecmNE.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
=========================================================== ____ _ ____ ____ ____ _ _ _ | _ \| |__ _ __ / ___/ ___/ ___| | | (_)_ __ | |_ | |_) | '_ \| '_ \ | | \___ \___ \ | | | | '_ \| __| | __/| | | | |_) | | |___ ___) |__) | | |___| | | | | |_ |_| |_| |_| .__/ \____|____/____/ |_____|_|_| |_|\__| |_| =========================================================== # Lint CSS string... => CSS string is not valid: - Unknown CSS property "font-display" (line: 1, char: 78) - Unknown CSS property "unicode-range" (line: 1, char: 193) - Unterminated "property content" (line: 1, char: 295) 

To Reproduce

vendor/bin/php-css-lint "@font-face{font-family:Poppins;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/poppins/v23/pxiEyp8kv8JHgFVrJJbecmNE.woff2) format('woff2');unicode-range:U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09}"

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.2

Additional context

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions