Title: console: add support for %c style formatter in console.log() · Issue #29605 · nodejs/node · GitHub
Open Graph Title: console: add support for %c style formatter in console.log() · Issue #29605 · nodejs/node
X Title: console: add support for %c style formatter in console.log() · Issue #29605 · nodejs/node
Description: Node's console currently supports a number of formatters, s, j, d, o, O, i, f. However, it doesn't support %c: > console.log('%cHello World', 'color:green; background:yellow;') %cHello World color:green; background:yellow; The same code ...
Open Graph Description: Node's console currently supports a number of formatters, s, j, d, o, O, i, f. However, it doesn't support %c: > console.log('%cHello World', 'color:green; background:yellow;') %cHello World color:...
X Description: Node's console currently supports a number of formatters, s, j, d, o, O, i, f. However, it doesn't support %c: > console.log('%cHello World', 'color:green; background:yellow;...
Opengraph URL: https://github.com/nodejs/node/issues/29605
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"console: add support for %c style formatter in console.log()","articleBody":"Node's console currently supports a number of formatters, [`s, j, d, o, O, i, f`](https://github.com/nodejs/node/blob/908292cf1f551c614a733d858528ffb13fb3a524/lib/internal/util/inspect.js#L1433-L1584). However, it doesn't support `%c`:\r\n\r\n```\r\n> console.log('%cHello World', 'color:green; background:yellow;')\r\n%cHello World color:green; background:yellow;\r\n```\r\n\r\nThe same code in Safari, Firefox, and Chrome does this:\r\n\r\n\u003cimg width=\"1225\" alt=\"Screen Shot 2019-09-18 at 3 55 58 PM\" src=\"https://user-images.githubusercontent.com/427398/65181697-9df56780-da2d-11e9-9867-4c0f172f3ec8.png\">\r\n\r\nThe [Console spec doesn't give a ton of help on what `%c` should do](https://console.spec.whatwg.org/#formatter), other than to say that it \"Applies provided CSS.\"\r\n\r\nObviously there are aspects of this that don't make sense in the terminal vs. a browser, but perhaps some of it does? It would be nice if node's `console` could do more than ignore `%c`.\r\n\r\nApologies if this has come up in the past and been rejected. I wasn't able to find a previous discussion.","author":{"url":"https://github.com/humphd","@type":"Person","name":"humphd"},"datePublished":"2019-09-18T20:07:09Z","url":"https://github.com/nodejs/node/issues/29605"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5ac5e935-bf2f-8381-c405-ae3ba201e5be |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4B6:12AE65:40CECA:53D1A5:6AED218F |
| html-safe-nonce | 4523a9b8ddc06559bfb091bd9cab29f85a77e474e1c66a032755b5455bffd432 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEI2OjEyQUU2NTo0MENFQ0E6NTNEMUE1OjZBRUQyMThGIiwidmlzaXRvcl9pZCI6IjM5NzU4MzMyNTMyNjI5OTE3NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fae7e041ea5406b4b1f3a7a35f264f57197ddce014b35bff0e87b394ece09186 |
| hovercard-subject-tag | issue:495429479 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/29605/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5bef3744d72a5bcbe73402272c4d2c64bdaccaf6b17150aa65952fa8e4cd5516/nodejs/node/issues/29605 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5bef3744d72a5bcbe73402272c4d2c64bdaccaf6b17150aa65952fa8e4cd5516/nodejs/node/issues/29605 |
| og:image:alt | Node's console currently supports a number of formatters, s, j, d, o, O, i, f. However, it doesn't support %c: > console.log('%cHello World', 'color:green; background:yellow;') %cHello World color:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | humphd |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width