Skip to content

Commit b0754bd

Browse files
committed
Merge branch 'rel-1.7'
2 parents a7d4377 + b3125bf commit b0754bd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Source/Blazorise.Bootstrap5/Providers/Bootstrap5ThemeGenerator.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,9 @@ protected override void GenerateBadgeVariantStyles( StringBuilder sb, Theme them
436436
var background = ToHex( backgroundColor );
437437
var yiqBackground = ToHex( yiqBackgroundColor );
438438

439-
sb.Append( $".badge.bg-{variant}" ).Append( "{" )
440-
.Append( $"color: {yiqBackground};" )
439+
sb.Append( $".badge.text-bg-{variant}" ).Append( "{" )
440+
.Append( $"color: {yiqBackground} !important;" )
441+
.Append( $"background-color: {background} !important;" )
441442
.AppendLine( "}" );
442443
}
443444

@@ -727,9 +728,12 @@ protected override void GenerateBreadcrumbStyles( StringBuilder sb, Theme theme,
727728

728729
protected override void GenerateBadgeStyles( StringBuilder sb, Theme theme, ThemeBadgeOptions options )
729730
{
730-
sb.Append( ".badge:not(.rounded-pill)" ).Append( "{" )
731-
.Append( $"border-radius: {GetBorderRadius( theme, options?.BorderRadius, Var( ThemeVariables.BorderRadius ) )};" )
732-
.AppendLine( "}" );
731+
if ( !string.IsNullOrEmpty( options?.BorderRadius ) )
732+
{
733+
sb.Append( ".badge:not(.rounded-pill)" ).Append( "{" )
734+
.Append( $"border-radius: {GetBorderRadius( theme, options?.BorderRadius, Var( ThemeVariables.BorderRadius ) )};" )
735+
.AppendLine( "}" );
736+
}
733737
}
734738

735739
protected override void GeneratePaginationStyles( StringBuilder sb, Theme theme, ThemePaginationOptions options )

0 commit comments

Comments
 (0)