Skip to content

Conversation

otomad
Copy link
Contributor

@otomad otomad commented Mar 25, 2025

Which issue, if any, is this issue related to?

Closes #8492

Is there anything in the PR that needs further explanation?

The rule declaration-property-value-no-unknown does not consider math to be a valid value for font-size. This is because math is not a valid syntax for font-size in CSSTree at this moment. Although MDN docs formal syntax contains it.

I have had to put math into patches for now, which is not a recommended approach and should be updated into CSSTree.

Copy link

changeset-bot bot commented Mar 25, 2025

🦋 Changeset detected

Latest commit: 60f479f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 25, 2025

PR packaged and instant preview available.

View demo website

Install locally:

npm i -D https://pkg.pr.new/stylelint@8495

(View Commit)

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@otomad Thanks for the pull request.

While we continue to discuss #8465, I think we can merge this as it's a simple keyword patch to the syntax.

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, LGTM 👍🏼

@jeddy3 jeddy3 merged commit 27439d9 into stylelint:main Apr 2, 2025
19 checks passed
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 9, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.17.0 | 16.18.0 |


## [v16.18.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16180---2025-04-06)

It adds 2 new rules and fixes 2 bugs. We've turned on these rules, and the `syntax-string-no-invalid` and `layer-name-pattern` ones from recent releases, in our [standard config](https://www.npmjs.com/package/stylelint-config-standard).

-   Added: `color-function-alias-notation` rule ([#8499](stylelint/stylelint#8499)) ([@EduardAkhmetshin](https://github.com/EduardAkhmetshin)).
-   Added: `container-name-pattern` rule ([#8498](stylelint/stylelint#8498)) ([@nate10j](https://github.com/nate10j)).
-   Fixed: `declaration-property-value-no-unknown` false positives for `math` of `font-size` ([#8495](stylelint/stylelint#8495)) ([@otomad](https://github.com/otomad)).
-   Fixed: `font-family-no-missing-generic-family-keyword` false positives for `math` ([#8489](stylelint/stylelint#8489)) ([@otomad](https://github.com/otomad)).
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 9, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.17.0 | 16.18.0 |


## [v16.18.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16180---2025-04-06)

It adds 2 new rules and fixes 2 bugs. We've turned on these rules, and the `syntax-string-no-invalid` and `layer-name-pattern` ones from recent releases, in our [standard config](https://www.npmjs.com/package/stylelint-config-standard).

-   Added: `color-function-alias-notation` rule ([#8499](stylelint/stylelint#8499)) ([@EduardAkhmetshin](https://github.com/EduardAkhmetshin)).
-   Added: `container-name-pattern` rule ([#8498](stylelint/stylelint#8498)) ([@nate10j](https://github.com/nate10j)).
-   Fixed: `declaration-property-value-no-unknown` false positives for `math` of `font-size` ([#8495](stylelint/stylelint#8495)) ([@otomad](https://github.com/otomad)).
-   Fixed: `font-family-no-missing-generic-family-keyword` false positives for `math` ([#8489](stylelint/stylelint#8489)) ([@otomad](https://github.com/otomad)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Fix declaration-property-value-no-unknown false positives for math of font-size
4 participants