Skip to content

Commit

Permalink
docs: add additional info on Width behaviour (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni authored Jan 9, 2025
1 parent 727d393 commit e163276
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions set.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ func (s Style) Background(c color.Color) Style {
return s
}

// Width sets the width of the block before applying margins. The width, if
// set, also determines where text will wrap.
// Width sets the width of the block before applying margins. This means your
// styled content will exactly equal the size set here. Text will wrap based on
// Padding and Borders set on the style.
func (s Style) Width(i int) Style {
s.set(widthKey, i)
return s
Expand Down

0 comments on commit e163276

Please sign in to comment.