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

fix: Update syntax for 'forced-color-adjust' & 'scale' properties, 'axis', 'color', 'scroller', 'system-color' types #771

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

pamelalozano16
Copy link
Contributor

@pamelalozano16 pamelalozano16 commented Oct 8, 2024

Description

Currently all these cases return a mismatch:
aspect-ratio: auto 3/4;
animation-timeline: scroll(self);,
forced-color-adjust: preserve-parent-color;.
color: LinkText;
scale: 50%

They are all valid CSS properties/values according to https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio#syntax, https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timeline#formal_syntax, https://developer.mozilla.org/en-US/docs/Web/CSS/system-color#syntax, and https://developer.mozilla.org/en-US/docs/Web/CSS/forced-color-adjust.

Motivation

Stylelint's rule declaration-property-value-no-unknown raises false positives. Demo
E.g.

.a {
  aspect-ratio: auto 3/4;
  aspect-ratio: 9/6 auto;
  animation-timeline: scroll(self);
  forced-color-adjust: preserve-parent-color;
  color: LinkText;
  scale: 50%;
}

@pamelalozano16 pamelalozano16 requested a review from a team as a code owner October 8, 2024 21:03
@pamelalozano16 pamelalozano16 requested review from pepelsbey and removed request for a team October 8, 2024 21:03
Copy link
Contributor

github-actions bot commented Oct 8, 2024

It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.

css/properties.json Outdated Show resolved Hide resolved
@pamelalozano16 pamelalozano16 changed the title Update aspect-ratio property Update aspect-ratio property and scroller() type syntax. Oct 8, 2024
@pamelalozano16 pamelalozano16 changed the title Update aspect-ratio property and scroller() type syntax. Update aspect-ratio property and scroller() type syntax. Oct 8, 2024
@pamelalozano16 pamelalozano16 changed the title Update aspect-ratio property and scroller() type syntax. Update properties and types syntax. Oct 8, 2024
css/properties.json Outdated Show resolved Hide resolved
css/syntaxes.json Outdated Show resolved Hide resolved
css/syntaxes.json Outdated Show resolved Hide resolved
@bsmth bsmth changed the title Update properties and types syntax. fix: Update properties and types syntax Oct 29, 2024
@bsmth
Copy link
Member

bsmth commented Oct 29, 2024

Thank you! FYI, aspect-ratio has been fixed here:

@pamelalozano16
Copy link
Contributor Author

@bsmth Will this fix be released on v2.12.2?

@bsmth bsmth changed the title fix: Update properties and types syntax fix: Update syntax for 'forced-color-adjust' & 'scale' properties, 'axis', 'color', 'scroller', 'system-color' types Nov 5, 2024
@bsmth
Copy link
Member

bsmth commented Nov 5, 2024

@bsmth Will this fix be released on v2.12.2?

Yes, I will merge these now and they will land in 2.12.2

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Thank you, all! 👍🏻

@bsmth bsmth merged commit 39f2aed into mdn:main Nov 5, 2024
3 checks passed
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.

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

Successfully merging this pull request may close these issues.

4 participants