servo / servo/rust-cssparser

Serialization of some idents results in redundant spaces

Open
#268 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
869
Forks
152
Avg merge
15h 8m
Merged PRs (30d)
12

Description

There's an open cssom issue about serialization of <custom-ident>. Gecko currently serialize "\\31st" as "\\31 st" which violates the general principle that values should serialize to the shortest form (the space is redundant in this case). It appears it comes from hex_escape which unconditionally adds a space.

CC @emilio

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 in src/serializer.rs at hex_escape, the entry point identified in the issue. Check how the escape for "\31st" is serialized against the shortest-form requirement from the linked CSSOM issue. Done means redundant spaces are omitted where safe, while required escape separation remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.