Skip to content

Commit

Permalink
dont overwrite background when inheriting
Browse files Browse the repository at this point in the history
  • Loading branch information
76creates authored and meowgorithm committed Feb 25, 2022
1 parent 0c67c8c commit 75c95df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions style.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ func (s Style) Inherit(i Style) Style {
// Padding is not inherited
continue
case backgroundKey:
if _, exists := s.rules[k]; exists {
continue
}
s.rules[k] = v

// The margins also inherit the background color
Expand Down

0 comments on commit 75c95df

Please sign in to comment.