charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.37k stars 252 forks source link

textinput TextStyle vs PlaceholderStyle inconsistency #245

Open Numilani opened 2 years ago

Numilani commented 2 years ago

When using a textinput, the TextStyle style is applied across the entire width of the line, as such: Screenshot from 2022-09-16 20-42-45

However, when using a placeholder, the PlaceholderStyle only applies to the bit behind the placeholder text, as such: Screenshot from 2022-09-16 20-43-55

the style for both is the same: lipgloss.NewStyle().Background(lipgloss.Color("#AFAFAF")).Foreground(lipgloss.Color("#000000"))

Not entirely sure if this would be considered a bug, but it seems like an inconsistent bit of behavior. Figured it was worth mentioning.

meowgorithm commented 2 years ago

Thank you: this is a good catch and we should be consistent here. The way the placeholder is rendering is the correct one and we should normalize the other case accordingly.