Skip to content

Commit a48cdef

Browse files
authored
feat(Tab): update css for fullscreen state (#5959)
* style: 更新样式防止溢出 * refactor: 增加全屏适配样式 * style: 增加约束 * style: 移除不使用的样式 * style: 移除不使用的样式 * style: 增加 Layout 下 Tab 全屏样式 * style: 增加 Tab 全屏样式
1 parent 2f518f9 commit a48cdef

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

src/BootstrapBlazor/Components/Layout/Layout.razor.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@
137137
position: relative;
138138
flex: 1;
139139

140+
> .tabs:fullscreen {
141+
--bb-layout-header-height: 0px;
142+
--bb-layout-footer-height: 0px;
143+
}
144+
140145
.tabs.tabs-border-card {
141146
box-shadow: none;
142147
}
@@ -275,8 +280,7 @@
275280
.layout-main > .tabs {
276281
height: calc(var(--bb-layout-height) - var(--bb-layout-header-height) - var(--bb-layout-footer-height));
277282

278-
.tabs-body {
279-
height: calc(100% - var(--bb-tabs-item-height));
283+
> .tabs-body {
280284
overflow: auto;
281285
}
282286
}

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@
1414
display: flex;
1515
flex-flow: column;
1616

17+
&:fullscreen {
18+
> .tabs-body {
19+
overflow: auto;
20+
}
21+
}
22+
23+
&:not(:has(> .tabs-header)) {
24+
> .tabs-body {
25+
--bb-tabs-item-height: 0px;
26+
}
27+
}
28+
29+
> .tabs-body {
30+
background-color: var(--bs-body-bg);
31+
padding: var(--bb-tabs-body-padding);
32+
flex: 1;
33+
height: 1%;
34+
min-height: 0;
35+
}
36+
1737
.tabs-body-content {
1838
background-color: var(--bs-body-bg);
1939

@@ -203,16 +223,6 @@
203223
}
204224
}
205225

206-
.tabs .tabs-body {
207-
background-color: var(--bs-body-bg);
208-
padding: var(--bb-tabs-body-padding);
209-
flex: 1;
210-
}
211-
212-
.tabs .tabs-content {
213-
position: relative;
214-
}
215-
216226
/*Card*/
217227
.tabs.tabs-card,
218228
.tabs.tabs-border-card {

0 commit comments

Comments
 (0)