Skip to content

Commit fba9bc2

Browse files
author
Jaap
committed
update DateSeparator/MessageList styles for better offset calculation
1 parent 12d1ba6 commit fba9bc2

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

src/styles/DateSeparator.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.str-chat__date-separator {
22
display: flex;
3-
margin: 40px;
3+
padding: 40px;
44
align-items: center;
55

66
&-date {
@@ -25,7 +25,7 @@
2525

2626
.commerce.str-chat {
2727
.str-chat__date-separator {
28-
margin: 40px 0;
28+
padding: 40px 0;
2929
}
3030
}
3131

src/styles/MessageList.scss

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
overflow-x: hidden;
44
overflow-y: auto;
55
-webkit-overflow-scrolling: touch; /* enable smooth scrolling on ios */
6-
padding: 75px 0 0 0;
6+
padding: 0 0 0 0;
7+
.str-chat__reverse-infinite-scroll {
8+
padding-top: 75px;
9+
}
710

811
&-wrapper {
912
flex: 1;
@@ -30,9 +33,6 @@
3033
margin: 0;
3134
}
3235

33-
.str-chat__reverse-infinite-scroll {
34-
}
35-
3636
.str-chat__custom-notification {
3737
border-radius: 4px;
3838
font-size: 12px;
@@ -76,9 +76,11 @@
7676
&.str-chat {
7777
.str-chat {
7878
&__list {
79-
padding: 55px 40px 0;
79+
padding: 0 40px 0;
8080
background: white;
81-
81+
.str-chat__reverse-infinite-scroll {
82+
padding-top: 55px;
83+
}
8284
&-notifications {
8385
background: white;
8486
}
@@ -87,7 +89,10 @@
8789
@media screen and (max-width: 960px) {
8890
.str-chat {
8991
&__list {
90-
padding: 55px 10px 0;
92+
padding: 0 10px 0;
93+
.str-chat__reverse-infinite-scroll {
94+
padding-top: 55px;
95+
}
9196
&-notifications {
9297
padding: 0 10px;
9398
}
@@ -109,7 +114,10 @@
109114
&.str-chat {
110115
.str-chat {
111116
&__list {
112-
padding: 55px 10px;
117+
padding: 0 10px;
118+
.str-chat__reverse-infinite-scroll {
119+
padding-top: 55px;
120+
}
113121
}
114122
}
115123
}
@@ -119,7 +127,10 @@
119127
&.str-chat {
120128
.str-chat {
121129
&__list {
122-
padding: 75px 20px 0;
130+
padding: 0 20px 0;
131+
.str-chat__reverse-infinite-scroll {
132+
padding-top: 75px;
133+
}
123134
&-notifications {
124135
padding-left: 22px;
125136
padding-right: 22px;

0 commit comments

Comments
 (0)