Visitar URL original
refactor: prune dead editor sass and consolidate duplicates by kpal81xd · Pull Request #2463 · playcanvas/editor · GitHub
Skip to content

refactor: prune dead editor sass and consolidate duplicates - #2463

Open
kpal81xd wants to merge 1 commit into
mainfrom
sass
Open

kpal81xd wants to merge 1 commit into
mainfrom
sass

Conversation

@kpal81xd

Copy link
Copy Markdown
Contributor

What's Changed

Prunes dead SASS and consolidates exact duplicates across the editor, code editor, launch and error stylesheets, with no intended visual change.

Before After
SCSS lines 26,734 21,549
editor.css 720 KB 516 KB
code-editor.css 117 KB 96 KB
error.css 75 KB 1.1 KB
launch.css 4.9 KB 4.9 KB
  • Removes ~3,500 rules that cannot match anything the editor creates: legacy pre-PCUI ui-* attribute rules, rules for removed panels, dead state classes, and selectors that Sass @extend wove into impossible combinations (e.g. .font-icon woven into ~400 selectors)
  • error.scss no longer imports the whole PCUI theme; it keeps the few values and the scrollbar rules the static error pages use
  • The code editor imports a new pcui/_pcui-core.scss (theme and tooltip only) instead of every editor-only PCUI extension
  • Drops declarations that are always overridden or that restate PCUI's own identical rules (color, gradient and curve inputs, color picker, font utilities)
  • Consolidates exact duplicates into shared mixins and placeholders: font placeholders, ghost-button states, fullscreen glyph, VC frames/lists, alert bar, strike-through; editor-wide tokens and mixins now live in _editor-tokens.scss
  • Merges identical keyframes into spin-360 and skeleton-pulse
  • Moves the MCP account popover styles into _editor-mcp.scss and folds _editor-scene-size-alert.scss into _editor-toolbar-alert.scss; deletes the empty _editor-settings-ai.scss

Verification: every change was checked with a cascade-aware comparison of the compiled CSS against main, and by swapping the old and new stylesheet into the running editor and diffing the computed style of every element (plus ::before/::after) and a screenshot. That covered the projects page, the idle editor, every entity and asset inspector in a sample project, scene settings, the color, version control, builds, project and team pickers, the code editor with a script open, the launch page and an error page. All showed zero differing styles.

Rules that never matched but look like they were meant to (removed as-is, worth a follow-up fix):

  • .script-asset-inspector-attribute-warning.clickable-warning: clickable script warnings never got the pointer/underline
  • .pcui-menu-item-postfix.disabled: PCUI uses pcui-disabled, so the disabled paste label was never hidden
  • .cms-card-desc.empty, .dev-log-post-actions { gap: 2px }: same value as, or overridden by, the parent rule

Manual smoke test:

  1. Open the projects page. Cards, list rows, the sidebar, the account menu and the MCP popover look unchanged.
  2. Open a project and select entities with different components. Inspector panels, headers and fields look unchanged.
  3. Select a material, texture, script, font and template asset. Each inspector and preview looks unchanged.
  4. Open scene settings, then a color field's color picker. Both look unchanged.
  5. Open Version Control: the branch list, history, diff and the progress widget look unchanged (no border on the progress status card).
  6. Open Builds & Publish. Apply a filter and open its menu: the button stays dark while the menu is open.
  7. Open the code editor with a script. The file tree, tabs and Monaco look unchanged.
  8. Launch a scene. The launch page chrome looks unchanged.

Checks

@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
editor Ready Ready Preview Oct 29, 2026 4:28pm UTC

Request Review

@kpal81xd kpal81xd self-assigned this Oct 29, 2026
@kpal81xd kpal81xd added enhancement New feature or request area: ui release: next patch Ticket marked for next patch release requires: manual review Can't be verified automatically; needs a person to reproduce or check the fix labels Oct 29, 2026

This branch was successfully deployed

1 active deployment
Preview — 70f32922 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui enhancement New feature or request release: next patch Ticket marked for next patch release requires: manual review Can't be verified automatically; needs a person to reproduce or check the fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant