Skip to content

Commit 81589e1

Browse files
committed
style: 层次化样式
1 parent f5fa337 commit 81589e1

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

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

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,25 @@
9494
}
9595
}
9696

97+
.layout-side {
98+
background-color: var(--bb-layout-sidebar-background);
99+
color: var(--bb-layout-sidebar-color);
100+
transition: transform .3s linear;
101+
transform: translateX(-100%);
102+
position: absolute;
103+
top: 0;
104+
bottom: 0;
105+
left: 0;
106+
right: 0;
107+
z-index: 1036;
108+
}
109+
97110
.layout-main {
98111
flex: 1;
112+
113+
.tabs.tabs-border-card {
114+
box-shadow: none;
115+
}
99116
}
100117

101118
.layout-header-bar {
@@ -114,6 +131,36 @@
114131
--bb-layout-footer-height: 0px;
115132
}
116133

134+
&.is-collapsed {
135+
.fa-bars {
136+
transform: rotate(90deg);
137+
}
138+
139+
.layout-side {
140+
transform: translateX(0);
141+
}
142+
143+
.layout-right {
144+
overflow: hidden;
145+
height: 100vh;
146+
}
147+
148+
.layout-footer {
149+
display: none;
150+
}
151+
152+
.has-sidebar {
153+
.layout-side {
154+
z-index: 1030;
155+
}
156+
157+
.layout-main {
158+
overflow: hidden;
159+
height: calc(100vh - var(--bb-layout-header-height));
160+
}
161+
}
162+
}
163+
117164
&.is-page {
118165
.has-sidebar {
119166
.layout-banner {
@@ -210,53 +257,6 @@
210257
display: flex;
211258
}
212259

213-
.layout-side {
214-
background-color: var(--bb-layout-sidebar-background);
215-
color: var(--bb-layout-sidebar-color);
216-
transition: transform .3s linear;
217-
transform: translateX(-100%);
218-
position: absolute;
219-
top: 0;
220-
bottom: 0;
221-
left: 0;
222-
right: 0;
223-
z-index: 1036;
224-
}
225-
226-
.layout.is-collapsed {
227-
.fa-bars {
228-
transform: rotate(90deg);
229-
}
230-
231-
.layout-side {
232-
transform: translateX(0);
233-
}
234-
235-
.layout-right {
236-
overflow: hidden;
237-
height: 100vh;
238-
}
239-
240-
.layout-footer {
241-
display: none;
242-
}
243-
244-
.has-sidebar {
245-
.layout-side {
246-
z-index: 1030;
247-
}
248-
249-
.layout-main {
250-
overflow: hidden;
251-
height: calc(100vh - var(--bb-layout-header-height));
252-
}
253-
}
254-
}
255-
256-
.layout .tabs.tabs-border-card {
257-
box-shadow: none;
258-
}
259-
260260
@media(min-width: 768px) {
261261
.layout {
262262
.layout-side {

0 commit comments

Comments
 (0)