0

in a global style folder, you have

button { color:black; background-color:hotPink} as normal.

but can you do anything like this for the console?

console { color:red; font-size: largest; }
phuzi
  • 12,078
  • 3
  • 26
  • 50
Alexander Hemming
  • 753
  • 1
  • 6
  • 28
  • 2
    Unless you have some wrapper for the console, then no. The console output is not part of the page. You *can* supply styles to the `console.log()` call itself, at least in Chrome. https://www.telerik.com/blogs/how-to-style-console-log-contents-in-chrome-devtools – VLAZ Jul 14 '21 at 08:47
  • There various packages to simplify as well, eg. [chalk](https://www.npmjs.com/package/chalk) – pilchard Jul 14 '21 at 08:50
  • Why? What's the use case? – Andreas Jul 14 '21 at 08:53
  • 2
    Yes! Easily with my tiny script https://github.com/yairEO/console-colors – vsync Jul 14 '21 at 08:56
  • I guess i can import something to use, or make something simple that you can import, but in this case it was more about makin something surprising for the other devs. a "why is all my code shiny" moment – Alexander Hemming Jul 14 '21 at 09:08

0 Answers0