Skip to content

Commit c0c8351

Browse files
zombieJclaude
andcommitted
refactor: use flex-direction instead of content margin for placement
Replace @contentMargin parameter with @flexDirection in placement mixin. Top positions use 'column', bottom positions use 'column-reverse'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5275ea4 commit c0c8351

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

assets/geek.less

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@
44
@notificationMotionEase: cubic-bezier(0.22, 1, 0.36, 1);
55
@notificationMotionOffset: 64px;
66

7-
.generate-placement(@placement, @vertical, @horizontal, @contentMargin, @stackClip, @motionX) {
7+
.generate-placement(@placement, @vertical, @horizontal, @flexDirection, @stackClip, @motionX) {
88
&-@{placement} {
99
@{vertical}: 0;
1010
@{horizontal}: 0;
1111
display: flex;
12-
flex-direction: column;
13-
14-
.@{notificationPrefixCls}-list-content {
15-
@{contentMargin}: auto;
16-
}
12+
flex-direction: @flexDirection;
1713

1814
.@{notificationPrefixCls}-notice {
1915
@{vertical}: var(--notification-y, 0);
@@ -77,31 +73,31 @@
7773
topRight,
7874
top,
7975
right,
80-
margin-bottom,
76+
column,
8177
inset(50% -50% -50% -50%),
8278
@notificationMotionOffset
8379
);
8480
.generate-placement(
8581
bottomRight,
8682
bottom,
8783
right,
88-
margin-top,
84+
column-reverse,
8985
inset(-50% -50% 50% -50%),
9086
@notificationMotionOffset
9187
);
9288
.generate-placement(
9389
topLeft,
9490
top,
9591
left,
96-
margin-bottom,
92+
column,
9793
inset(50% -50% -50% -50%),
9894
-@notificationMotionOffset
9995
);
10096
.generate-placement(
10197
bottomLeft,
10298
bottom,
10399
left,
104-
margin-top,
100+
column-reverse,
105101
inset(-50% -50% 50% -50%),
106102
-@notificationMotionOffset
107103
);

0 commit comments

Comments
 (0)