Skip to content

Commit 8989db3

Browse files
authored
Merge branch 'main' into doc-toast
2 parents d1d17c6 + c33eb02 commit 8989db3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/BootstrapBlazor/Components/Affix/Affix.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public partial class Affix
4040
.Build();
4141

4242
private string? StyleString => CssBuilder.Default("position: sticky;")
43-
.AddClass($"z-index: {ZIndex};", ZIndex.HasValue)
44-
.AddClass($"{Position.ToDescriptionString()}: {Offset}px;")
43+
.AddStyle("z-index", $"{ZIndex}", ZIndex.HasValue)
44+
.AddStyle($"{Position.ToDescriptionString()}", $"{Offset}px")
4545
.AddStyleFromAttributes(AdditionalAttributes)
4646
.Build();
4747
}

src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ public partial class Captcha
2020
/// 获得 组件宽度
2121
/// </summary>
2222
private string? StyleString => CssBuilder.Default()
23-
.AddClass($"width: {Width + 42}px;", Width > 0)
23+
.AddStyle("width", $"{Width + 42}px", Width > 0)
2424
.Build();
2525

2626
/// <summary>
2727
/// 获得 加载图片失败样式
2828
/// </summary>
2929
private string? FailedStyle => CssBuilder.Default()
30-
.AddClass($"width: {Width}px;", Width > 0)
31-
.AddClass($"height: {Height}px;", Height > 0)
30+
.AddStyle("width", $"{Width}px", Width > 0)
31+
.AddStyle("height", $"{Height}px", Height > 0)
3232
.Build();
3333

3434
/// <summary>

src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ public partial class Drawer
1919
.Build();
2020

2121
private string? StyleString => CssBuilder.Default()
22-
.AddClass($"--bb-drawer-position: {Position};", !string.IsNullOrEmpty(Position))
22+
.AddStyle("--bb-drawer-position", $"{Position}", !string.IsNullOrEmpty(Position))
2323
.AddStyleFromAttributes(AdditionalAttributes)
2424
.Build();
2525

2626
/// <summary>
2727
/// 获得 抽屉 Style 字符串
2828
/// </summary>
2929
private string? DrawerStyleString => CssBuilder.Default()
30-
.AddClass($"--bb-drawer-width: {Width};", !string.IsNullOrEmpty(Width) && Placement != Placement.Top && Placement != Placement.Bottom)
31-
.AddClass($"--bb-drawer-height: {Height};", !string.IsNullOrEmpty(Height) && (Placement == Placement.Top || Placement == Placement.Bottom))
30+
.AddStyle("--bb-drawer-width", $"{Width}", !string.IsNullOrEmpty(Width) && Placement != Placement.Top && Placement != Placement.Bottom)
31+
.AddStyle("--bb-drawer-height", $"{Height}", !string.IsNullOrEmpty(Height) && (Placement == Placement.Top || Placement == Placement.Bottom))
3232
.Build();
3333

3434
/// <summary>

0 commit comments

Comments
 (0)