Skip to content

Commit 0d2199f

Browse files
authored
Refactor notification toast styles for responsiveness
1 parent f3bd77f commit 0d2199f

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/main.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -729,18 +729,25 @@ input[type="search"]::-webkit-search-results-decoration {
729729
.notification-toast-container {
730730
position: absolute;
731731
bottom: 20px;
732-
right: 20px;
732+
left: 10px;
733+
right: 10px;
733734
display: flex;
734735
flex-direction: column;
736+
align-items: flex-end;
735737
gap: 8px;
736738
z-index: 1000;
739+
pointer-events: none;
740+
741+
>* {
742+
pointer-events: auto;
743+
}
737744

738745
.notification-toast {
739746
padding: 12px;
740747
border-radius: 6px;
741748
background: var(--secondary-color);
742-
min-width: 300px;
743-
max-width: 400px;
749+
min-width: 200px;
750+
max-width: min(400px, calc(100vw - 40px));
744751
display: flex;
745752
gap: 12px;
746753
align-items: flex-start;
@@ -750,6 +757,7 @@ input[type="search"]::-webkit-search-results-decoration {
750757
border: 1px solid var(--border-color);
751758
word-break: break-word;
752759
white-space: normal;
760+
box-sizing: border-box;
753761

754762
&.hiding {
755763
transform: translateX(120%);
@@ -826,9 +834,11 @@ input[type="search"]::-webkit-search-results-decoration {
826834
}
827835

828836
@media (max-width: 768px) {
837+
align-items: stretch;
838+
829839
.notification-toast {
830840
min-width: auto;
831-
max-width: calc(100vw - 40px);
841+
max-width: 100%;
832842
}
833843
}
834844
}
@@ -843,4 +853,4 @@ input[type="search"]::-webkit-search-results-decoration {
843853
transform: translateX(0);
844854
opacity: 1;
845855
}
846-
}
856+
}

0 commit comments

Comments
 (0)