discourse/plugins/chat/assets/stylesheets/common/chat-height-mixin.scss
David Taylor d88ee33eb6
DEV: Introduce stylelint (#29852)
Stylelint is a css linter: https://stylelint.io/

As part of this change we have added two javascript scripts:

```
pnpm lint:css
pnpm lint:css:fix
```

Look at `.vscode/settings.json.sample` and `.vscode/extensions.json` for
configuration in VSCode.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-20 15:27:42 +00:00

27 lines
683 B
SCSS

@mixin chat-height($inset: 0) {
// desktop and mobile
// -1px is for the bottom border of the chat navbar
$base-height: calc(
var(--composer-vh, 1vh) * 100 - var(--main-outlet-offset, 0px) - 1px -
$inset
);
height: calc($base-height - var(--composer-height, 0px));
// mobile with keyboard opened
html.keyboard-visible & {
height: calc($base-height);
}
// ipad
html.footer-nav-ipad & {
height: calc($base-height - var(--composer-height, 0px));
}
// PWA/HUB without keyboard
html.footer-nav-visible:not(.keyboard-visible) & {
height: calc(
$base-height - var(--composer-height, 0px) - var(--footer-nav-height, 0px)
);
}
}