danfickle / danfickle/openhtmltopdf

css selector "nth-last-child(2)"

Open
#888 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

Hi all!
I am trying to select the penultimate(the second last) column with the css selector "nth-last-child(2)". The html itself works but in the generated pdf does not work. I tried some of the sandbox projects (https://sandbox.openhtmltopdf.com) but it didn't work there either. I wonder if this is a bug and do you know a workaround for this?

Update
I found this in the logs
```
WARNING:: nth-last-child is not a valid function in this context at line 51. Skipping ruleset.
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue in the linked sandbox projects using a table or other markup with :nth-last-child(2), then compare browser rendering with the generated PDF. Start from the warning that nth-last-child is not a valid function and trace the CSS selector handling. Done means the selector works in generated PDFs or a documented workaround is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.