Skip to content

Commit 2fc00ad

Browse files
committed
style: 重构样式
1 parent 6816b57 commit 2fc00ad

File tree

1 file changed

+42
-41
lines changed

1 file changed

+42
-41
lines changed

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

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -502,40 +502,25 @@
502502
padding: 0 1rem;
503503
z-index: 1;
504504

505-
.tab-corner {
506-
height: 2rem;
507-
width: 2rem;
508-
display: inline-flex;
509-
justify-content: center;
510-
align-items: center;
511-
position: absolute;
512-
background-color: var(--bb-tabs-header-bg-color);
505+
&.active {
506+
z-index: 5;
513507

514-
&::after {
515-
content: '';
516-
position: absolute;
517-
height: 100%;
518-
width: 100%;
519-
background-color: var(--bb-tabs-header-bg-color);
508+
.tab-corner {
509+
background-color: var(--bs-body-bg);
520510
}
521511
}
522512

523-
.tab-corner-left {
524-
bottom: 0;
525-
left: -1rem;
526-
527-
&::after {
528-
border-bottom-right-radius: 50%;
513+
&:not(.active) {
514+
.tabs-item:not(.disabled) .tabs-item-body {
515+
&:hover {
516+
border-radius: 20px;
517+
background-color: var(--bb-tabs-item-hover-bg-color);
518+
}
529519
}
530520
}
531521

532-
.tab-corner-right {
533-
bottom: 0;
534-
right: -1rem;
535-
536-
&::after {
537-
border-bottom-left-radius: 50%;
538-
}
522+
&:not(:first-child) {
523+
margin-left: -2rem;
539524
}
540525

541526
.tabs-item {
@@ -561,31 +546,47 @@
561546
}
562547

563548
.tabs-item-close {
564-
display: block;
549+
display: flex;
565550
position: unset;
566-
width: 1em;
551+
width: 21px;
552+
height: 21px;
553+
border-radius: 50%;
567554
}
568555
}
569556
}
570557

571-
&:not(.active) {
572-
.tabs-item .tabs-item-body {
573-
&:hover {
574-
border-radius: 20px;
575-
background-color: var(--bb-tabs-item-hover-bg-color);
576-
}
558+
.tab-corner {
559+
height: 2rem;
560+
width: 2rem;
561+
display: inline-flex;
562+
justify-content: center;
563+
align-items: center;
564+
position: absolute;
565+
566+
&::after {
567+
content: '';
568+
position: absolute;
569+
height: 100%;
570+
width: 100%;
571+
background-color: var(--bb-tabs-header-bg-color);
577572
}
578573
}
579574

580-
&:not(:first-child) {
581-
margin-left: -2rem;
575+
.tab-corner-left {
576+
bottom: 0;
577+
left: -1rem;
578+
579+
&::after {
580+
border-bottom-right-radius: 50%;
581+
}
582582
}
583583

584-
&.active {
585-
z-index: 5;
584+
.tab-corner-right {
585+
bottom: 0;
586+
right: -1rem;
586587

587-
.tab-corner {
588-
background-color: var(--bs-body-bg);
588+
&::after {
589+
border-bottom-left-radius: 50%;
589590
}
590591
}
591592
}

0 commit comments

Comments
 (0)