Skip to content
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

font-weight numeric does not catch typos #6591

Closed
paroxyzm opened this issue Jan 25, 2023 · 1 comment
Closed

font-weight numeric does not catch typos #6591

paroxyzm opened this issue Jan 25, 2023 · 1 comment

Comments

@paroxyzm
Copy link

What steps are needed to reproduce the bug?

More of a question than a bug. Maybe it is behaving as intended.

A link to a working example

CSS source:
a { font-weight: bld; }

What Stylelint configuration is needed to reproduce the bug?

{
  "rules": {
    "font-weight-notation": "numeric"
    }
}

How did you run Stylelint?

CLI

Which version of Stylelint are you using?

14.16.1

What did you expect to happen?

I expected an error pointing to an invalid value. Only numeric values should be allowed, per config.

If I DO NOT make a typo and type:

a { font-weight: bold; }

An error is properly raised.

What actually happened?

No errors

Does the bug relate to non-standard syntax?

No response

Proposal to fix the bug

Shouldn't the bug be reported the same way when I input "bold" instead of "bld"?

@jeddy3
Copy link
Member

jeddy3 commented Jan 25, 2023

@paroxyzm Thanks for the report and for using the template.

I expected an error pointing to an invalid value.

A rule to do this may land in stylelint@15.0.0 - See #6511

In the meantime, you can use the stylelint-csstree-validator plugin to validate pairs of properties & values.

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

No branches or pull requests

2 participants