8000 Fix `declaration-property-value-no-unknown` false positives for non-standard values of `overflow-*` and false negatives for `position-try-options` by Mouvedia · Pull Request #8381 · stylelint/stylelint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix declaration-property-value-no-unknown false positives for non-standard values of overflow-* and false negatives for position-try-options #8381

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Mouvedia
Copy link
Member
@Mouvedia Mouvedia commented Feb 6, 2025

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

Closes #8339
Closes #7964

Is there anything in the PR that needs further explanation?

While waiting for #8100 we can fix some of the false positives/negatives.

https://csstree.github.io/docs/syntax/#Type:-non-standard-overflow
https://caniuse.com/mdn-css_properties_position-try-fallbacks

see also


It will be merged if csstree/csstree#323 and csstree/csstree#324 are not included in the next version of css-tree in a timely manner.

…tandard values of `overflow-*` and false negatives for `position-try-options`
Copy link
changeset-bot bot commented Feb 6, 2025

🦋 Changeset detected

Latest commit: f6e7844

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

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

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

@Mouvedia Mouvedia requested a review from jeddy3 February 6, 2025 19:48
@@ -69,6 +69,9 @@ const rule = (primary, secondaryOptions) => {

/** @type {SecondaryOptions['propertiesSyntax']} */
const propertiesSyntax = {
'overflow-x': '| <-non-standard-overflow>',
'overflow-y': '| <-non-standard-overflow>',
'position-try-options': "<'position-try-fallbacks'>",
Copy link
Member

Choose a reason for hiding this comment

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

Based on this discussion, Stylelint shouldn't actively support removed or deprecated CSS features unless they have a broad impact. I think this change shouldn't be made. What do you think?

Copy link
Member Author
@Mouvedia Mouvedia Feb 15, 2025

Choose a reason for hiding this comment

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

I think it's harmless and will be discussed more seriously once we will transition to #8100.
i.e. #8100 won't support that kind of renames AFAIK

Copy link
Member

Choose a reason for hiding this comment

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

As far as I know, extending already renamed features like this hasn't been done before.
Adding it here would set a precedent.

Since multiple members have expressed opposition to this change, I think we should avoid adding it.
I’m also against it. If needed, users can easily extend it themselves.

Copy link
Member Author

Choose a reason for hiding this comment

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

What I am doing for overflow-x and overflow-y is similar; these values are non-standard but are or used to be supported by browsers.
i.e. either we accept the PR as a whole on the same principle or we don't ever support anything "non-standard" and close the PR

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the late reply.
I submitted a PR to CSSTree to handle these properties upstream:

This was based on Romain's comment:

(You could open an issue upstream with either csstree or mdn-data to request that they preserve position-try-options as valid.)

Let me know what you think.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's great but since none of us have write access on csstree, it might take a while.
Let's wait and see.

@Mouvedia
Copy link
Member Author
Mouvedia commented Apr 4, 2025

@ybiquitous both @ryo-manba's PRs are still unmerged; should we move on with this PR or wait for the resolution of #8465?

@ybiquitous
Copy link
Member

Users can avoid the issues by using the propertiesSyntax secondary option, right? Does Stylelint or CSSTree need to continue supporting legacy properties?

@Mouvedia
Copy link
Member Author
Mouvedia commented Apr 5, 2025

supporting legacy properties

If you meant vendor-prefixed values and deprecated values, stylelint distinguishes between known—i.e. ever supported—and deprecated since we added the declaration-property-value-keyword-no-deprecated rule. For vendor-prefixed values, csstree already patches overflow so it makes perfect sense to extend it to overflow-x/overflow-y as well—i.e. it was probably an oversight.

My question was not about the merit of this PR but about whether we continue to wait or take action.

927F @ybiquitous
Copy link
Member

I'm in favor of waiting unless this PR is not requested by many users.

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