Skip to content

Commit b4f9d5d

Browse files
committed
refactor: 调整样式
1 parent 36b3a27 commit b4f9d5d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/BootstrapBlazor/Components/Tab/Tab.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public partial class Tab : IHandlerException
2929
.Build();
3030

3131
private string? GetClassString(TabItem item) => CssBuilder.Default("tabs-item")
32-
.AddClass("active", item.IsActive && !item.IsDisabled)
32+
.AddClass("active", !IsChromeStyle && item.IsActive && !item.IsDisabled)
3333
.AddClass("disabled", item.IsDisabled)
3434
.AddClass(item.CssClass)
3535
.AddClass("is-closeable", ShowClose)

src/BootstrapBlazor/Components/Tab/Tab.razor.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@
491491
.tabs-chrome {
492492
--bb-tabs-header-bg-color: var(--bs-border-color);
493493
--bb-tabs-item-hover-bg-color: rgba(var(--bs-body-color-rgb), 0.1);
494-
--bb-tabs-item-active-bg-color: var(--bs-body-color);
494+
--bb-tabs-item-active-bg-color: var(--bs-body-bg);
495495
--bb-tabs-item-active-color: var(--bs-body-color);
496496
--bb-tabs-item-hover-color: var(--bs-body-color);
497497

@@ -510,6 +510,10 @@
510510
.tab-corner {
511511
background-color: var(--bs-body-bg);
512512
}
513+
514+
.tabs-item {
515+
background-color: var(--bb-tabs-item-active-bg-color);
516+
}
513517
}
514518

515519
&:not(.active) {
@@ -532,10 +536,6 @@
532536
border-top-right-radius: 10px;
533537
height: 36px !important;
534538

535-
.active {
536-
background-color: var(--bb-tabs-item-active-bg-color);
537-
}
538-
539539
.tabs-item-body {
540540
padding: 4px 10px;
541541
display: flex;

0 commit comments

Comments
 (0)