Skip to content

Commit b84fffc

Browse files
committed
chore(demo): revert changes in drawer example
1 parent ffae15a commit b84fffc

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

projects/demo/src/modules/components/drawer/examples/2/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
<tui-drawer
1010
*tuiPopup="open()"
1111
direction="left"
12+
class="drawer"
1213
[overlay]="true"
13-
[style.inline-size.rem]="20"
14-
[style.top.px]="0"
1514
(click.self)="onClose()"
1615
>
1716
<header class="header">
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
.drawer {
2+
top: 0;
3+
border-radius: 0;
4+
inline-size: 20rem;
5+
}
6+
17
.header {
28
position: sticky;
39
}

projects/kit/components/drawer/drawer.style.less

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,32 @@
1111
border-top-left-radius: 1.25rem;
1212
border-top-right-radius: 1.25rem;
1313

14-
&[style*='top: 0'] {
15-
border-radius: 0;
16-
17-
.t-aside {
18-
padding-block-start: env(safe-area-inset-top);
19-
}
20-
}
21-
2214
&.tui-enter,
2315
&.tui-leave {
2416
animation-name: tuiFade, tuiSlide;
2517
}
2618

27-
&._overlay::before {
28-
.transition(opacity);
29-
30-
content: '';
31-
position: fixed;
32-
top: -100vh;
33-
left: -100vw;
34-
right: -100vw;
35-
bottom: -100vh;
36-
background: var(--tui-service-backdrop);
37-
transition-timing-function: ease-out;
38-
39-
tui-root:has(tui-dialogs .t-overlay_visible) & {
40-
opacity: 0;
41-
transition-timing-function: ease-in;
19+
&._overlay {
20+
> .t-aside {
21+
padding-block-start: env(safe-area-inset-top);
22+
}
23+
24+
&::before {
25+
.transition(opacity);
26+
27+
content: '';
28+
position: fixed;
29+
top: -100vh;
30+
left: -100vw;
31+
right: -100vw;
32+
bottom: -100vh;
33+
background: var(--tui-service-backdrop);
34+
transition-timing-function: ease-out;
35+
36+
tui-root:has(tui-dialogs .t-overlay_visible) & {
37+
opacity: 0;
38+
transition-timing-function: ease-in;
39+
}
4240
}
4341
}
4442
}

0 commit comments

Comments
 (0)