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

How to select in pairs? #127

Closed
extf33 opened this issue Apr 5, 2023 · 1 comment
Closed

How to select in pairs? #127

extf33 opened this issue Apr 5, 2023 · 1 comment
Labels
C-question A question about the library.

Comments

@extf33
Copy link

extf33 commented Apr 5, 2023

How to select only pre.CCC with "Hello, Rust!" immediately before it, in the code below?

<section id="AAA">
    <p class="BBB">Hello, Rust!</p>
    <pre class="CCC">...</pre> ----------> O
    <p>...</p>
    <pre class="CCC">...</pre> ----------> X
</section>
@adamreichold
Copy link
Contributor

adamreichold commented Apr 5, 2023

Did you try p.BBB + pre.CCC which selects the pre.CCC if it is immediately preceded by p.BBB? If you try select based on Hello, Rust!, then this not yet possible with CSS selectors AFAIK.

@teymour-aldridge teymour-aldridge added the C-question A question about the library. label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question A question about the library.
Projects
None yet
Development

No branches or pull requests

4 participants