question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nested `.dim()` affects surrounding styles too

See original GitHub issue

It seems dim doesn’t handle being nested inside another style:

The following:

const chalk = require('chalk');

console.log(chalk.bold(chalk.dim('bold-dim'), 'bold'));

Produces:

screen shot 2018-08-03 at 00 44 28

While it should produce:

screen shot 2018-08-03 at 00 45 18

I reproduced this in both Terminal.app and iTerm.app on macOS 10.13.

// @Qix- Any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
kovidgoyalcommented, Sep 19, 2018

Sure, more power to you. I can promise to at least implement them in kitty if you are able to get the ball rolling.

1reaction
Qix-commented, Apr 21, 2021

Years later, I’m going to go ahead and close this. Similar discussions in the emulator community have stalled a few times in recent years and I simply don’t see this problem getting fixed in any meaningful way.

Unless a whole new CLI technology rolls around to completely replace the archaic, broken, underspecified, slow, unportable, incompatibility-laden, opinionated, arbitrary, poorly implemented, spottily supported, Wikipedia-based, and holy-war-causing PTY/TTY “standards”, this isn’t something that is chalk’s burden to bear, nor is it something I feel could be resolved with a few stray bug reports.

There are too many emulators nowadays all doing their own thing based on their own set of philosophies and it’s not worth anyone’s time to bikeshed on how serial codes meant for transmission control over parallel/RS-232 ports should be interpreted in order to produce rainbow text on a $4000 gaming machine in 2021.

There’s nothing actionable here - I thank everyone’s discussion and hope it serves as a historic reference for anyone interested in endeavoring down this treacherous and unending path.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Targeting nested elements with CSS - html - Stack Overflow
Personally, I use them when I need to give special styles to a Global Class within a certain ID/Class. Share.
Read more >
Relationship of grid layout to other layout methods - CSS
I have five child items in my container, and I have given the flex properties values so that they can grow and shrink...
Read more >
9 Functionals - Advanced R
In particular, nested conditions and loops must be viewed with great suspicion. Complicated control flows confuse programmers. Messy code often hides bugs. — ......
Read more >
Build a Responsive UI with ConstraintLayout
ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It's similar to RelativeLayout in...
Read more >
Adjust layer properties in After Effects - Adobe Support
Transformations, such as rotation and scale, occur around the anchor point (sometimes called transformation point or transformation center) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found