mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 10:33:22 +00:00
calc top value based on page
This commit is contained in:
@@ -25,11 +25,11 @@ import { PageFeedbackForm } from '../PageFeedback';
|
||||
|
||||
function getTopOffset(props: { sectionsHeader: boolean; topHeader: boolean }) {
|
||||
if (props.topHeader && props.sectionsHeader) {
|
||||
return 'lg:top-[6.75rem] lg:max-h-[calc(100vh_-_6.75rem)]';
|
||||
return 'lg:top-[calc(100vh_-_6.75rem)] lg:max-h-[calc(100vh_-_6.75rem)]';
|
||||
}
|
||||
|
||||
if (props.topHeader) {
|
||||
return 'lg:top-16 lg:max-h-[calc(100vh_-_4rem)]';
|
||||
return 'lg:top-[calc(100vh_-_4rem)] lg:max-h-[calc(100vh_-_4rem)]';
|
||||
}
|
||||
|
||||
return 'lg:top-0 lg:max-h-screen';
|
||||
|
||||
Reference in New Issue
Block a user