Skip to content

[css-pseudo] Add boundary element and line break element selector. #11020

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

Closed
JF98 opened this issue Oct 11, 2024 · 2 comments
Closed

[css-pseudo] Add boundary element and line break element selector. #11020

JF98 opened this issue Oct 11, 2024 · 2 comments

Comments

@JF98
Copy link

JF98 commented Oct 11, 2024

The following English text comes from machine translation and may not be accurate:

:top-child is used to select the closest child element to the top of the parent container.
:right-child is used to select the closest child element to the right side of the parent container.
:bottom-child is used to select the closest child element to the bottom of the parent container.
:left-child is used to select the closest child element to the left side of the parent container.

:wrap-child selects child elements that are in a wrapped position within the container("sub-elements arranged in a non-first row).

If :top-child is implemented, then :wrap-child may not need to be added, but can instead be achieved using the following method:

.parent > :not(:top-child) {
  /* style */
}

We also need you to confirm whether the above suggestions are limited to child elements within the document flow.

@JoshTumath
Copy link
Contributor

Do you have a use case for these suggested pseudo-classes?

@fantasai
Copy link
Collaborator

In general we don't add pseudo-classes that depend on layout, since this can be cyclic.

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

No branches or pull requests

3 participants