Skip to content

html: select each side's colors by cell position - #3

Open
jvoisin wants to merge 1 commit into
ctrliq:mainfrom
jvoisin:celpos
Open

jvoisin wants to merge 1 commit into
ctrliq:mainfrom
jvoisin:celpos

Conversation

@jvoisin

@jvoisin jvoisin commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Every source cell carried a data-side attribute that only the stylesheet read. Since each row pair holds exactly two cells, left then right, :first-child and :last-child select the same cells without repeating the attribute in every row. This removes about 4% of a large report's size.

Every source cell carried a data-side attribute that only the
stylesheet read. Since each row pair holds exactly two cells, left then
right, :first-child and :last-child select the same cells without
repeating the attribute in every row. This removes about 4% of a large
report's size.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The two-cell ordering preserves color selection, and no remaining consumers depend on the removed attributes.

0 open findings

What changed in this PR

Reduces HTML report size by using cell position to select each side’s highlight colors.

Changes:

  • Replaces attribute-based CSS selectors with :first-child and :last-child.
  • Removes redundant data-side attributes from generated cells.
  • Updates both standalone sample reports.
File Description
src/​html.css Selects highlight colors by cell position.
src/​html.c Stops emitting data-side attributes.
samples/​indentation.html Updates embedded styles and cell markup.
samples/​arguments.html Updates embedded styles and cell markup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants