-
-
Notifications
You must be signed in to change notification settings - Fork 965
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
base: main
Are you sure you want to change the base?
Conversation
…tandard values of `overflow-*` and false negatives for `position-try-options`
🦋 Changeset detectedLatest commit: f6e7844 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -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'>", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
- Add patch for
position-try-options
csstree/csstree#324 - Add patch for
overflow-x
andoverflow-y
csstree/csstree#323
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.
There was a problem hiding this comment.
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.
lib/rules/declaration-property-value-no-unknown/__tests__/index.mjs
Outdated
Show resolved
Hide resolved
@ybiquitous both @ryo-manba's PRs are still unmerged; should we move on with this PR or wait for the resolution of #8465? |
Users can avoid the issues by using the |
If you meant vendor-prefixed values and deprecated values, stylelint distinguishes between known—i.e. ever supported—and deprecated since we added the My question was not about the merit of this PR but about whether we continue to wait or take action. |
I'm in favor of waiting unless this PR is not requested by many users. |
Closes #8339
Closes #7964
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
declaration-property-value-keyword-no-deprecated
false negatives foroverflow-x
,overflow-y
and warning message foroverflow
#8340property-no-deprecated
#8382It 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.