From 74e01f672d78cb30cf7c36b35ed59fd70d5f0126 Mon Sep 17 00:00:00 2001 From: Dusan Gligoric <7six@protonmail.com> Date: Wed, 23 Feb 2022 00:05:25 +0100 Subject: [PATCH] remove repeating code --- example/vet/main.go | 1 + style.go | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) create mode 100644 example/vet/main.go diff --git a/example/vet/main.go b/example/vet/main.go new file mode 100644 index 00000000..bb0169f2 --- /dev/null +++ b/example/vet/main.go @@ -0,0 +1 @@ +package vet diff --git a/style.go b/style.go index abfcf025..0c81ff30 100644 --- a/style.go +++ b/style.go @@ -137,11 +137,6 @@ 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 if !s.isSet(marginBackgroundKey) && !i.isSet(marginBackgroundKey) { s.rules[marginBackgroundKey] = v