-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
A bug was filed recently about support for ANSI color codes in console.log in Firefox (Bug 1720116) where the reporter mentioned Chrome supporting ANSI color codes in console.log parameters.
For example the following call:
console.log(`\u001B[31mThis will be a red string in Chrome`);will be rendered in red in Chrome (and Node I think), but not in Firefox nor Safari.
I took a look at the spec and I don't think there's anything about ANSI codes (sorry if I missed it).
It would be particularly interesting to define how those should play with %c.
At the moment Chrome seems to treat them as another "style block" as in the following snippet
console.log("%cHello \u001B[31mRED", "background-color: yellow")Hello does have a yellow background, but RED does not.
prestancedesign, Beyondo and steve02081504
Metadata
Metadata
Assignees
Labels
No labels