From e0aa9f6b9c088ffc8b339550a0f22232cb4a04ff Mon Sep 17 00:00:00 2001 From: bashbunni Date: Mon, 2 Dec 2024 15:42:12 -0800 Subject: [PATCH] fix(examples): base col widths on page width --- examples/layout/main.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/layout/main.go b/examples/layout/main.go index 21d3b7d4..79c2aa2f 100644 --- a/examples/layout/main.go +++ b/examples/layout/main.go @@ -126,9 +126,9 @@ var ( list = lipgloss.NewStyle(). Border(lipgloss.NormalBorder(), false, true, false, false). BorderForeground(subtle). - MarginRight(2). + MarginRight(1). Height(8). - Width(columnWidth + 1) + Width(width / 3) listHeader = base. BorderStyle(lipgloss.NormalBorder()). @@ -152,7 +152,6 @@ var ( } // Paragraphs/History. - historyStyle = lipgloss.NewStyle(). Align(lipgloss.Left). Foreground(lipgloss.Color("#FAFAFA")). @@ -282,7 +281,7 @@ func main() { listItem("Pomelo"), ), ), - list.Width(columnWidth).Render( + list.Render( lipgloss.JoinVertical(lipgloss.Left, listHeader("Actual Lip Gloss Vendors"), listItem("Glossier"), @@ -294,7 +293,7 @@ func main() { ), ) - doc.WriteString(lipgloss.JoinHorizontal(lipgloss.Top, lists, colors)) + doc.WriteString(lipgloss.JoinHorizontal(lipgloss.Top, lists, lipgloss.NewStyle().MarginLeft(1).Render(colors))) // Marmalade history {