Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using consola.box with colors in the body adds extra padding #316

Open
TheDutchCoder opened this issue Oct 11, 2024 · 0 comments
Open

Using consola.box with colors in the body adds extra padding #316

TheDutchCoder opened this issue Oct 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TheDutchCoder
Copy link

TheDutchCoder commented Oct 11, 2024

Environment

Node: v20.13.0
OS: MacOS Sequoia 15
consola: 3.2.3

Reproduction

consola.box({
  title: ' RVezy Nuxt tools' ,
  message: ` Tools and commands for a better Developer Experience `,
  style: {
    padding: 1,
    borderColor: "cyan",
  },
});

// Outputs
// ╭─────────────────── RVezy Nuxt tools ─────────────────────╮
// │                                                          │
// │   Tools and commands for a better Developer Experience   │
// │                                                          │
// ╰──────────────────────────────────────────────────────────╯

However

consola.box({
  title: ` ${colors.blue('RVezy')} ${colors.cyan('Nuxt')} ${colors.blue('tools')} `,
  message: ` ${colors.blue('Tools')} and ${colors.blue('commands')} for a better Developer Experience`,
  style: {
    padding: 1,
    borderColor: "cyan",
  },
});

// Outputs
// ╭──────────────────────────── RVezy Nuxt tools ───────────────────────────────╮
// │                                                                             │
// │   Tools and commands for a better Developer Experience                      │
// │                                                                             │
// ╰─────────────────────────────────────────────────────────────────────────────╯

Describe the bug

When using colors in the body part of a box, it adds a lot of padding at the end.

Additional context

No response

Logs

No response

@TheDutchCoder TheDutchCoder added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant