Nested `.dim()` affects surrounding styles too
See original GitHub issueIt 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:
While it should produce:
I reproduced this in both Terminal.app and iTerm.app on macOS 10.13.
// @Qix- Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (14 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, more power to you. I can promise to at least implement them in kitty if you are able to get the ball rolling.
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.