diff --git a/layouts/partials/shortcodes/tabs.html b/layouts/partials/shortcodes/tabs.html
index 8dc0ee5718..5d17300d98 100644
--- a/layouts/partials/shortcodes/tabs.html
+++ b/layouts/partials/shortcodes/tabs.html
@@ -11,8 +11,8 @@
{{- $tab = merge $tab (dict "title" .name) }}
{{- end }}
{{- with $tab }}
- {{- $color := .color | default $color }}
- {{- $style := .style | default $style | default (cond (ne .color "") "filled" "initial") }}
+ {{- $color := .color | default $color | default "" }}
+ {{- $style := .style | default $style | default (cond (ne $color "") "filled" "initial") }}
{{- $title := .title | default ($style | T) }}
{{- $title = trim $title " " }}
{{- $icon := .icon | default "" }}
@@ -37,7 +37,7 @@
{{- end }}
{{- end }}
{{- $color = .color | default "" }}
-{{- $style = .style | default (cond (ne .color "") "filled" "initial") }}
+{{- $style = .style | default (cond (ne $color "") "filled" "initial") }}
{{- $title = .title | default ($style | T) }}
{{- $title = trim $title " " }}
{{- $icon = .icon | default "" }}