2021-03-05 04:48:09 +03:00
|
|
|
package lipgloss
|
|
|
|
|
|
|
|
// UnsetBold removes the bold style rule, if set.
|
|
|
|
func (s Style) UnsetBold() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, boldKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetItalic removes the italic style rule, if set.
|
|
|
|
func (s Style) UnsetItalic() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, italicKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2022-02-14 19:39:57 +03:00
|
|
|
// UnsetUnderline removes the underline style rule, if set.
|
2021-03-05 04:48:09 +03:00
|
|
|
func (s Style) UnsetUnderline() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, underlineKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetStrikethrough removes the strikethrough style rule, if set.
|
|
|
|
func (s Style) UnsetStrikethrough() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, strikethroughKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetReverse removes the reverse style rule, if set.
|
|
|
|
func (s Style) UnsetReverse() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, reverseKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2023-03-12 13:04:42 +03:00
|
|
|
// UnsetBlink removes the blink style rule, if set.
|
2021-03-05 04:48:09 +03:00
|
|
|
func (s Style) UnsetBlink() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, blinkKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetFaint removes the faint style rule, if set.
|
|
|
|
func (s Style) UnsetFaint() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, faintKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetForeground removes the foreground style rule, if set.
|
2021-03-05 04:48:09 +03:00
|
|
|
func (s Style) UnsetForeground() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, foregroundKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetBackground removes the background style rule, if set.
|
|
|
|
func (s Style) UnsetBackground() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, backgroundKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetWidth removes the width style rule, if set.
|
|
|
|
func (s Style) UnsetWidth() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, widthKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-24 21:42:45 +03:00
|
|
|
// UnsetHeight removes the height style rule, if set.
|
|
|
|
func (s Style) UnsetHeight() Style {
|
|
|
|
delete(s.rules, heightKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2022-08-30 23:59:06 +03:00
|
|
|
// UnsetAlign removes the horizontal and vertical text alignment style rule, if set.
|
2021-03-05 04:48:09 +03:00
|
|
|
func (s Style) UnsetAlign() Style {
|
2022-08-30 23:59:06 +03:00
|
|
|
delete(s.rules, alignHorizontalKey)
|
|
|
|
delete(s.rules, alignVerticalKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetAlignHorizontal removes the horizontal text alignment style rule, if set.
|
|
|
|
func (s Style) UnsetAlignHorizontal() Style {
|
|
|
|
delete(s.rules, alignHorizontalKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2022-11-08 12:55:11 +03:00
|
|
|
// UnsetAlignVertical removes the vertical text alignment style rule, if set.
|
2022-08-30 23:59:06 +03:00
|
|
|
func (s Style) UnsetAlignVertical() Style {
|
|
|
|
delete(s.rules, alignVerticalKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetPadding removes all padding style rules.
|
|
|
|
func (s Style) UnsetPadding() Style {
|
2021-03-24 20:55:43 +03:00
|
|
|
delete(s.rules, paddingLeftKey)
|
|
|
|
delete(s.rules, paddingRightKey)
|
|
|
|
delete(s.rules, paddingTopKey)
|
|
|
|
delete(s.rules, paddingBottomKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetPaddingLeft removes the left padding style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetPaddingLeft() Style {
|
|
|
|
delete(s.rules, paddingLeftKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetPaddingRight removes the right padding style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetPaddingRight() Style {
|
|
|
|
delete(s.rules, paddingRightKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetPaddingTop removes the top padding style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetPaddingTop() Style {
|
|
|
|
delete(s.rules, paddingTopKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2023-03-12 13:04:42 +03:00
|
|
|
// UnsetPaddingBottom removes the bottom padding style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetPaddingBottom() Style {
|
|
|
|
delete(s.rules, paddingBottomKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-05 20:23:25 +03:00
|
|
|
// UnsetColorWhitespace removes the rule for coloring padding, if set.
|
|
|
|
func (s Style) UnsetColorWhitespace() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, colorWhitespaceKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetMargins removes all margin style rules.
|
|
|
|
func (s Style) UnsetMargins() Style {
|
2021-03-24 20:55:43 +03:00
|
|
|
delete(s.rules, marginLeftKey)
|
|
|
|
delete(s.rules, marginRightKey)
|
|
|
|
delete(s.rules, marginTopKey)
|
|
|
|
delete(s.rules, marginBottomKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetMarginLeft removes the left margin style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetMarginLeft() Style {
|
|
|
|
delete(s.rules, marginLeftKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetMarginRight removes the right margin style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetMarginRight() Style {
|
|
|
|
delete(s.rules, marginRightKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetMarginTop removes the top margin style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetMarginTop() Style {
|
|
|
|
delete(s.rules, marginTopKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetMarginBottom removes the bottom margin style rule, if set.
|
2021-03-24 20:55:43 +03:00
|
|
|
func (s Style) UnsetMarginBottom() Style {
|
|
|
|
delete(s.rules, marginBottomKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:12:55 +03:00
|
|
|
// UnsetMarginBackground removes the margin's background color. Note that the
|
|
|
|
// margin's background color can be set from the background color of another
|
|
|
|
// style during inheritance.
|
2021-03-31 01:08:06 +03:00
|
|
|
func (s Style) UnsetMarginBackground() Style {
|
|
|
|
delete(s.rules, marginBackgroundKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-26 03:43:40 +03:00
|
|
|
// UnsetBorderStyle removes the border style rule, if set.
|
|
|
|
func (s Style) UnsetBorderStyle() Style {
|
|
|
|
delete(s.rules, borderStyleKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetBorderTop removes the border top style rule, if set.
|
|
|
|
func (s Style) UnsetBorderTop() Style {
|
|
|
|
delete(s.rules, borderTopKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetBorderRight removes the border right style rule, if set.
|
2021-03-26 03:43:40 +03:00
|
|
|
func (s Style) UnsetBorderRight() Style {
|
|
|
|
delete(s.rules, borderRightKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetBorderBottom removes the border bottom style rule, if set.
|
2021-03-26 03:43:40 +03:00
|
|
|
func (s Style) UnsetBorderBottom() Style {
|
|
|
|
delete(s.rules, borderBottomKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetBorderLeft removes the border left style rule, if set.
|
|
|
|
func (s Style) UnsetBorderLeft() Style {
|
|
|
|
delete(s.rules, borderLeftKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:12:55 +03:00
|
|
|
// UnsetBorderForeground removes all border foreground color styles, if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderForeground() Style {
|
|
|
|
delete(s.rules, borderTopForegroundKey)
|
|
|
|
delete(s.rules, borderRightForegroundKey)
|
|
|
|
delete(s.rules, borderBottomForegroundKey)
|
|
|
|
delete(s.rules, borderLeftForegroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderTopForeground removes the top border foreground color rule,
|
2021-03-26 03:43:40 +03:00
|
|
|
// if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderTopForeground() Style {
|
|
|
|
delete(s.rules, borderTopForegroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderRightForeground removes the right border foreground color rule,
|
2021-03-26 03:43:40 +03:00
|
|
|
// if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderRightForeground() Style {
|
|
|
|
delete(s.rules, borderRightForegroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderBottomForeground removes the bottom border foreground color
|
2021-03-26 03:43:40 +03:00
|
|
|
// rule, if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderBottomForeground() Style {
|
|
|
|
delete(s.rules, borderBottomForegroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderLeftForeground removes the left border foreground color rule,
|
2021-03-26 03:43:40 +03:00
|
|
|
// if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderLeftForeground() Style {
|
|
|
|
delete(s.rules, borderLeftForegroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderBackground removes all border background color styles, if
|
2021-03-26 03:43:40 +03:00
|
|
|
// set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderBackground() Style {
|
|
|
|
delete(s.rules, borderTopBackgroundKey)
|
|
|
|
delete(s.rules, borderRightBackgroundKey)
|
|
|
|
delete(s.rules, borderBottomBackgroundKey)
|
|
|
|
delete(s.rules, borderLeftBackgroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2022-02-14 19:39:57 +03:00
|
|
|
// UnsetBorderTopBackgroundColor removes the top border background color rule,
|
2021-03-26 03:43:40 +03:00
|
|
|
// if set.
|
|
|
|
func (s Style) UnsetBorderTopBackgroundColor() Style {
|
2021-04-07 19:09:05 +03:00
|
|
|
delete(s.rules, borderTopBackgroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderRightBackground removes the right border background color
|
2021-03-26 03:43:40 +03:00
|
|
|
// rule, if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderRightBackground() Style {
|
|
|
|
delete(s.rules, borderRightBackgroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderBottomBackground removes the bottom border background color
|
2021-03-26 03:43:40 +03:00
|
|
|
// rule, if set.
|
2021-04-07 19:09:05 +03:00
|
|
|
func (s Style) UnsetBorderBottomBackground() Style {
|
|
|
|
delete(s.rules, borderBottomBackgroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-07 19:09:05 +03:00
|
|
|
// UnsetBorderLeftBackground removes the left border color rule, if set.
|
|
|
|
func (s Style) UnsetBorderLeftBackground() Style {
|
|
|
|
delete(s.rules, borderLeftBackgroundKey)
|
2021-03-26 03:43:40 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-05 05:07:54 +03:00
|
|
|
// UnsetInline removes the inline style rule, if set.
|
|
|
|
func (s Style) UnsetInline() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, inlineKey)
|
2021-03-05 05:07:54 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-05 04:48:09 +03:00
|
|
|
// UnsetMaxWidth removes the max width style rule, if set.
|
|
|
|
func (s Style) UnsetMaxWidth() Style {
|
2021-03-16 20:42:24 +03:00
|
|
|
delete(s.rules, maxWidthKey)
|
2021-03-05 04:48:09 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-04-06 06:03:10 +03:00
|
|
|
// UnsetMaxHeight removes the max height style rule, if set.
|
2021-03-24 21:42:45 +03:00
|
|
|
func (s Style) UnsetMaxHeight() Style {
|
|
|
|
delete(s.rules, maxHeightKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2023-10-10 17:27:52 +03:00
|
|
|
// UnsetTabWidth removes the tab width style rule, if set.
|
2023-07-24 18:22:48 +03:00
|
|
|
func (s Style) UnsetTabWidth() Style {
|
|
|
|
delete(s.rules, tabWidthKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-10 18:21:21 +03:00
|
|
|
// UnsetUnderlineSpaces removes the value set by UnderlineSpaces.
|
2021-03-16 20:42:24 +03:00
|
|
|
func (s Style) UnsetUnderlineSpaces() Style {
|
|
|
|
delete(s.rules, underlineSpacesKey)
|
2021-03-06 00:34:46 +03:00
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2022-02-14 19:39:57 +03:00
|
|
|
// UnsetStrikethroughSpaces removes the value set by StrikethroughSpaces.
|
2021-03-16 20:42:24 +03:00
|
|
|
func (s Style) UnsetStrikethroughSpaces() Style {
|
|
|
|
delete(s.rules, strikethroughSpacesKey)
|
|
|
|
return s
|
|
|
|
}
|
2021-03-24 19:59:09 +03:00
|
|
|
|
2023-11-27 22:33:38 +03:00
|
|
|
// UnsetTransform removes the value set by Transform.
|
|
|
|
func (s Style) UnsetTransform() Style {
|
|
|
|
delete(s.rules, transformKey)
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2021-03-24 19:59:09 +03:00
|
|
|
// UnsetString sets the underlying string value to the empty string.
|
|
|
|
func (s Style) UnsetString() Style {
|
|
|
|
s.value = ""
|
|
|
|
return s
|
|
|
|
}
|