Skip to content

refactor(editor): split stylesheets by concern — tokens + revisions (styling Phase 2b)#164

Merged
mhurhangee merged 1 commit into
mainfrom
refactor/editor-styling-split
Jul 1, 2026
Merged

refactor(editor): split stylesheets by concern — tokens + revisions (styling Phase 2b)#164
mhurhangee merged 1 commit into
mainfrom
refactor/editor-styling-split

Conversation

@mhurhangee

Copy link
Copy Markdown
Owner

Phase 2b of the styling consolidation. Pure content reorganization, no rule changed.

What

Carve the two entry stylesheets into concern files, wired via @import aggregators so consumers are unchanged:

  • tokens.css — the --docx-* palette (light + dark), out of editor.css. One obvious home for "where do I change an editor colour."
  • revisions.css — the tracked-change structural cues, out of prosemirror.css.
  • editor.css @imports tokens.css; prosemirror.css @imports revisions.css.

Safety (behaviour-preserving, proven)

  • No rule lost/added: diffed sorted non-comment lines of each original vs the union of its split files → identical.
  • Cascade order: @import sits at file top, so revisions.css loads before the painter rules (was mid-file). Verified none of the 12 .ep-revision-*/.layout-revision-* classes appear in the painter stylesheet → no shared targets → order immaterial. Token definitions likewise don't double-define.
  • pnpm check green (biome accepts the @import placement) · bun test 1739 pass · Vercel rebuilds the CSS graph (confirms the @imports resolve + bundle).

Carve the two entry stylesheets into concern files, wired via @import aggregators
so consumers are unchanged (frontend still imports editor.css; hidden-prose-mirror
still imports prosemirror.css):

- tokens.css — the --docx-* palette (light + dark), out of editor.css. 'Where do I
  change an editor colour' now has one obvious home.
- revisions.css — the tracked-change structural cues, out of prosemirror.css.

editor.css @imports tokens.css; prosemirror.css @imports revisions.css. Verified
behaviour-preserving by diffing sorted non-comment lines against the pre-split files
(no rule lost or added).
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
patrick-web Ready Ready Preview, Comment Jul 1, 2026 1:05pm

@mhurhangee mhurhangee merged commit 83af382 into main Jul 1, 2026
3 checks passed
@mhurhangee mhurhangee deleted the refactor/editor-styling-split branch July 1, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant