ansicolor-dart icon indicating copy to clipboard operation
ansicolor-dart copied to clipboard

Ability to nest styles

Open seaneagan opened this issue 10 years ago • 1 comments

Currently when you try to nest styles it doesn't work because when a pen is done writing it resets all styles, not just its own. Here's one take on an API to do this:

https://github.com/sindresorhus/chalk#api

seaneagan avatar Dec 18 '14 18:12 seaneagan

I know I'm late on responding to these. I like the idea of storing a stack of "complete state" such that:

  1. down: bold + red + green background
  2. down: bold + blue background
  3. up

Would see only having the blue background removed and green background restored at step-3

jtmcdole avatar Sep 26 '20 23:09 jtmcdole