Skip to content

Conversation

@amadeus
Copy link
Member

@amadeus amadeus commented Jan 20, 2026

There were a couple pieces to supporting this.

  • It was a specialized language like 'text' that was already built it
    • This means we had to skip resolving it like 'text' but still allow the string to be passed through
  • ANSI is only supported as a language override
    • Not sure there's a proper extension for ANSI?
  • In order to support the background colors I needed to rework some of the token naming conventions to allow ansi background colors to be properly supported
    • This involved renaming the css variable prefix on token variables so as not to potentially inherit the global bg, which makes a lot of other things quite annoying. I am pretty happy with this solution and it shouldn't really have any downstream effects I don't think (i.e. pretty safe)
    • This PR also adds support for text decorations and bg colors in themes if supported
CleanShot 2026-01-19 at 16 07 58

NOTE: The PR is beefy because we had to update a bunch of snapshots

There were a couple pieces to supporting this.

* It was a specialized language like `'text'` that was already built it
  * This means we had to skip resolving it like `'text'` but still allow
    the string to be passed through
* ANSI is only supported as a language override
  * Not sure there's a proper extension for ANSI
* In order to support the background colors I needed to rework some of
  the token naming conventions to allow ansi background colors to be
  properly supported
  * This involved renaming the css variable prefix on token variables so
    as not to potentially inherit the global bg, which makes a lot of
    other things quite annoying. I am pretty happy with this solution
    and it shouldn't really have any downstream effects I don't think
    (i.e. pretty safe)
@vercel
Copy link

vercel bot commented Jan 20, 2026

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

Project Deployment Review Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Jan 20, 2026 0:15am
pierrejs-docs Ready Ready Preview Jan 20, 2026 0:15am
pierrejs-solid-diff-demo Ready Ready Preview Jan 20, 2026 0:15am

Request Review

underlined text
reversed text
strikethrough text
underlined + strikethrough text
Copy link
Member Author

Choose a reason for hiding this comment

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

Just including this so it's easy to test ANSI stuff in the future.

@amadeus amadeus merged commit 9a43f12 into main Jan 20, 2026
9 checks passed
@amadeus amadeus deleted the amadeus/ansi-fixes branch January 20, 2026 00:24
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.

2 participants