Skip to content

Render generated icon-font pseudo-elements correctly in tabs and list rows #246

Description

@wieslawsoltes

Problem

The unchanged VS Code OSS workbench shows oversized path-like graphics over document tabs and Explorer rows in the native result. Chromium shows the intended small file icons.

The affected pixels are generated icon-font pseudo-elements:

  • active tab .monaco-icon-label::before: U+E023, font-family: seti, font-size: 19.5px, color rgb(212,215,214);
  • Explorer TypeScript row .monaco-icon-label::before: U+E099, font-family: seti, font-size: 19.5px, color rgb(81,154,186).

Both have background-image: none and no mask. The earlier URL-backed SVG background work in WebScene #251 and AppScene #128 remains valid, but it does not exercise this primitive.

Root cause

WebScene retained pseudo font-size and line-height, but not pseudo font-family. The declaration was classified as unsupported, the generated layout node inherited the originating element's system UI face, and kind-3 scene serialization emitted that same originating family. AppScene then shaped the Seti private-use code point with the wrong face.

The smallest fix is entirely in WebScene:

  • retain the winning pseudo font-family, including !important, inherit, and unset behavior;
  • copy an explicit family to the generated layout node so intrinsic measurement and paint agree;
  • include family changes in pseudo layout equality;
  • serialize the explicit family in kind-3 text resources, with originating-element inheritance when absent.

No AppScene or VS Code selector change is required.

Reproduction and regression

A dedicated browser/native reftest uses a parent system UI face and generated U+E023/U+E099 pseudo content selecting a small OFL webfont fixture. Ordinary spans provide the independent reference.

From exact WebScene 140ec3453cf9862f051079b341a4a749d2fa83b3:

  • native: FAIL, 21,796 differing pixels, actual SHA-256 f7aeee0b9f12920b54cea51204ea37cb6e8370824d6f602fee82e8e6b4ec0d44 versus reference c083da5f76b7fde46f7bd2997c3491652e24cdb4b7aae1b2e5c36889173a92b6;
  • Chromium 153.0.8010.48: PASS, zero differing test/reference pixels.

With candidate bac65c11 rebased onto exact current main acb032f7:

  • native: PASS, test/reference SHA-256 both c083da5f76b7fde46f7bd2997c3491652e24cdb4b7aae1b2e5c36889173a92b6;
  • Chromium: PASS, test/reference SHA-256 both 12c2d14473ce71395ec36dfe5a365e8bdd2f7625688300a5ad8bf878ba4b7eaf.

The native scene gate asserts the exact kind-3 family and intrinsic width, !important winner retention, explicit inheritance, class mutation/restoration, command checksum, and stable generated node IDs. Its 4,096-icon / 100-cycle run completed in 4.14 ms, emitted exactly 4,096 matching kind-3 commands, retained 1,488 bytes of pseudo storage, kept the warmed text-measurement cache stable, measured each explicit family once, and left no animation-frame demand.

Acceptance

Scheduling

Review ready PR #295 as the next focused WebScene correction. It is based directly on exact current main acb032f7; the rebased native and Chromium gates pass. After integration, keep this issue open until the unchanged Code OSS tab and Explorer regional pixel gates pass from one exact package. Track CSS semantics under #235/#241 and product-level Chromium/native acceptance under #259.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions