Skip to content

Background/Foreground color styling doesn't work when packaging as gem #6

@indigotechtutorials

Description

@indigotechtutorials

I ran into this bug when trying to use a bubble tea app with lipgloss as a ruby gem. It seems like the styling is working properly when running the file directly but when using it as an executable inside a gem it breaks. I haven't tested this after publishing the gem but I assume it would be the same.

The padding still seems to get applied but color styling is ignored

Image Image

This is my simple bubbletea app for this example

require "bubbletea"
require "lipgloss"

class BubbleTeaHello
  include Bubbletea::Model

  def init
    [self, nil]
  end

  def update(message)
    case message.to_s
    when "q", "ctrl+c"
      [self, Bubbletea.quit]
    end
  end

  def view
    style = Lipgloss::Style.new
      .bold(true)
      .foreground("#FAFAFA")
      .background("#7D56F4")
      .padding(1, 2)
    style.render "Hello World!"
  end
end

Bubbletea.run(BubbleTeaHello.new)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions