Skip to content

Commit

Permalink
Merge pull request #14 from Spinoco/feature/break-on-minimum-height
Browse files Browse the repository at this point in the history
Allow to break content on the minimum height so the chat has close bu…
  • Loading branch information
mraulim authored Nov 19, 2024
2 parents 6d01066 + fb59daf commit d42440f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ $mobile-breakpoint: "384px";
@media (max-width: $mobile-breakpoint) { @content; }
}

// For the desktop screens that are smaller on height so the full plugin is not visible (close button is not visible)
@mixin low-height-screen {
@media (max-height: 680px) { @content; }
}

@function rem($value) {
$remValue: calc($value / 16) + rem;

Expand Down
17 changes: 17 additions & 0 deletions src/styles/components/wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
border-radius: 0;
}

@include low-height-screen {
top: 0;
right: 0;
bottom: 0;

border-radius: 0;
}

.swp-chat-box {
position: relative;
z-index: 4;
Expand All @@ -54,6 +62,10 @@
height: 100%;
}

@include low-height-screen {
height: 100%;
}

.swp-chat-box-loader {
position: absolute;

Expand Down Expand Up @@ -117,6 +129,11 @@
width: 100%;
height: 0;
}

@include low-height-screen {
flex-grow: 1;
height: 0;
}
}
}
}

0 comments on commit d42440f

Please sign in to comment.