Skip to content

Conversation

@jamesnw
Copy link
Collaborator

@jamesnw jamesnw commented Nov 6, 2024

See #2170 for more info

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Nov 6, 2024
@jamesnw jamesnw marked this pull request as ready for review November 12, 2024 20:45
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Some optional description suggestions here, but I'm happy with this merging whenever you think it's ready.

@@ -0,0 +1,18 @@
name: Form validity pseudo-classes
description: "The form validity CSS pseudo-classes match <form> elements that are `:valid` or `:invalid`, `:optional` or `:required`, or in or out of an acceptable range."
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little nervous about using syntax as words in this way. Here's my suggested route instead. Also I think it'd be nice if this showed up in a search for "constraint" (as with the constraint validation API).

Suggested change
description: "The form validity CSS pseudo-classes match <form> elements that are `:valid` or `:invalid`, `:optional` or `:required`, or in or out of an acceptable range."
description: "The form validity CSS pseudo-classes match `<form>` elements based on the constraints of a form field, such as validity (`:valid`, `:invalid`, `:in-range`, `:out-of-range`) and necessity (`:optional` or `:required`)."

status:
compute_from: css.selectors.any-link
compat_features:
- css.selectors.any-link
Copy link
Collaborator

Choose a reason for hiding this comment

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

I had no idea this one existed—every day I'm learning about some new-to-me thing on this project. Cool, but slightly concerning.

@@ -0,0 +1,7 @@
name: :scope pseudo-class
description: The `:scope` CSS pseudo-class represents the scoping root, for instance the element that `querySelector()` is called on.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: The `:scope` CSS pseudo-class represents the scoping root, for instance the element that `querySelector()` is called on.
description: The `:scope` CSS pseudo-class matches the scoping root, for instance the element that `querySelector()` is called on.

Copy link
Contributor

Choose a reason for hiding this comment

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

This description should also mention that the pseudo-class is useful when used inside @scope blocks.

MDN:

When used inside a @scope block, :scope matches the block's defined scope root.

https://developer.mozilla.org/en-US/docs/Web/CSS/:scope

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. Added.

@@ -0,0 +1,7 @@
name: :scope pseudo-class
description: The `:scope` CSS pseudo-class represents the scoping root, for instance the element that `querySelector()` is called on.
Copy link
Contributor

Choose a reason for hiding this comment

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

This description should also mention that the pseudo-class is useful when used inside @scope blocks.

MDN:

When used inside a @scope block, :scope matches the block's defined scope root.

https://developer.mozilla.org/en-US/docs/Web/CSS/:scope

@jamesnw jamesnw merged commit 32df3ec into web-platform-dx:main Nov 14, 2024
3 checks passed
@jamesnw jamesnw deleted the selectors-high branch November 14, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants