mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 21:51:25 +08:00
4b15ba405c
This commit also removes safe-area-inset-bottom when keyboard is displayed to avoid having a taller than needed space between composer and replying indicator.
40 lines
1.1 KiB
SCSS
40 lines
1.1 KiB
SCSS
@mixin chat-height {
|
|
// desktop and mobile
|
|
height: calc(
|
|
var(--chat-vh, 1vh) * 100 - var(--header-offset, 0px) -
|
|
var(--chat-draft-header-height, 0px) -
|
|
var(--chat-direct-message-creator-height, 0px) -
|
|
env(safe-area-inset-bottom)
|
|
);
|
|
|
|
// mobile with keyboard opened
|
|
.keyboard-visible & {
|
|
height: calc(
|
|
var(--chat-vh, 1vh) * 100 - var(--header-offset, 0px) -
|
|
var(--chat-draft-header-height, 0px) -
|
|
var(--chat-direct-message-creator-height, 0px)
|
|
);
|
|
}
|
|
|
|
// ipad
|
|
.footer-nav-ipad & {
|
|
height: calc(
|
|
var(--chat-vh, 1vh) * 100 - var(--header-offset, 0px) -
|
|
var(--footer-nav-height, 0px) - var(--chat-draft-header-height, 0px) -
|
|
var(--chat-direct-message-creator-height, 0px) -
|
|
env(safe-area-inset-bottom)
|
|
);
|
|
}
|
|
|
|
// ipad with keyboard opened
|
|
.keyboard-visible & {
|
|
.footer-nav-ipad & {
|
|
height: calc(
|
|
var(--chat-vh, 1vh) * 100 - var(--header-offset, 0px) -
|
|
var(--footer-nav-height, 0px) - var(--chat-draft-header-height, 0px) -
|
|
var(--chat-direct-message-creator-height, 0px)
|
|
);
|
|
}
|
|
}
|
|
}
|