diff --git a/README.md b/README.md index f9e01b4..1376c7c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ GoDoc Build Status phorm.ai -

Style definitions for nice terminal layouts. Built with TUIs in mind. @@ -226,12 +225,15 @@ For more on borders see [the docs][docs]. ## Copying Styles -Just use assignment +Just use assignment: ```go -var style = lipgloss.NewStyle().Foreground(lipgloss.Color("219")) +style := lipgloss.NewStyle().Foreground(lipgloss.Color("219")) + +copiedStyle := style // this is a true copy + +wildStyle := style.Blink(true) // this is also true copy, with blink added -var wildStyle = style.Blink(true) ``` Since `Style` data structures contains only primitive types, assigning a style diff --git a/style.go b/style.go index 522352c..198751c 100644 --- a/style.go +++ b/style.go @@ -189,7 +189,7 @@ func (s Style) String() string { // Copy returns a copy of this style, including any underlying string values. // -// Deprecated: Copy is deprecated and will be removed in a future release. +// Deprecated: to copy just use assignment (i.e. a := b). All methods also return a new style. func (s Style) Copy() Style { return s }