linebender / linebender/resvg

':root' selector is not supported

Open
#960 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.1k
Forks
348
Avg merge
1d 14h
Merged PRs (30d)
3

Description

resvg doesn't support the ':root' selector, so some images do not render properly. For example, ChatGPT icon (https://github.com/user-attachments/assets/46acf9a9-5c14-4457-a9eb-394c49ac385b / https://cdn.oaistatic.com/assets/favicon-l4nq08hd.svg) renders as a transparent image.

```svg

```

```
Warning (in simplecss::selector:318): ':root' is not supported. Selector skipped.
Warning (in simplecss:298): The @media rule is not supported. Skipped.
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported ChatGPT SVG and inspect the selector handling associated with the simplecss::selector warning. Check how :root rules are parsed and applied, then verify that the example renders with its root fill instead of becoming transparent and that the unsupported-selector warning is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.