use absolute positioning instead of fixed (#1860)

This commit is contained in:
Aakansha Doshi 2020-07-02 18:57:47 +05:30 committed by GitHub
parent d9e84b90ce
commit b21f723eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 25 deletions

View File

@ -8,7 +8,7 @@
} }
.LoadingMessage { .LoadingMessage {
position: fixed; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;

View File

@ -1,6 +1,6 @@
.FixedSideContainer { .FixedSideContainer {
--margin: 0.25rem; --margin: 0.25rem;
position: fixed; position: absolute;
pointer-events: none; pointer-events: none;
} }

View File

@ -224,29 +224,32 @@ const LayerUI = ({
))} ))}
</UserList> </UserList>
</div> </div>
{
<div
className={`App-menu App-menu_bottom zen-mode-transition ${
zenModeEnabled && "App-menu_bottom--transition-left"
}`}
>
<Stack.Col gap={2}>
<Section heading="canvasActions">
<Island padding={1}>
<ZoomActions
renderAction={actionManager.renderAction}
zoom={appState.zoom}
/>
</Island>
{renderEncryptedIcon()}
</Section>
</Stack.Col>
</div>
}
</FixedSideContainer> </FixedSideContainer>
); );
}; };
const renderBottomAppMenu = () => {
return (
<div
className={`App-menu App-menu_bottom zen-mode-transition ${
zenModeEnabled && "App-menu_bottom--transition-left"
}`}
>
<Stack.Col gap={2}>
<Section heading="canvasActions">
<Island padding={1}>
<ZoomActions
renderAction={actionManager.renderAction}
zoom={appState.zoom}
/>
</Island>
{renderEncryptedIcon()}
</Section>
</Stack.Col>
</div>
);
};
const renderFooter = () => ( const renderFooter = () => (
<footer role="contentinfo" className="layer-ui__wrapper__footer"> <footer role="contentinfo" className="layer-ui__wrapper__footer">
<div <div
@ -315,6 +318,7 @@ const LayerUI = ({
/> />
)} )}
{renderFixedSideContainer()} {renderFixedSideContainer()}
{renderBottomAppMenu()}
{ {
<aside <aside
className={`layer-ui__wrapper__github-corner zen-mode-transition ${ className={`layer-ui__wrapper__github-corner zen-mode-transition ${

View File

@ -259,13 +259,14 @@ button,
} }
.App-menu_bottom { .App-menu_bottom {
position: fixed; position: absolute;
bottom: 0; bottom: 0;
grid-template-columns: 1fr auto 1fr; grid-template-columns: 1fr auto 1fr;
grid-gap: 4px; grid-gap: 4px;
align-items: flex-start; align-items: flex-start;
cursor: default; cursor: default;
pointer-events: none !important; pointer-events: none !important;
left: 0.25rem;
&--transition-left { &--transition-left {
section { section {
@ -394,7 +395,7 @@ button,
} }
.dropdown-select__language.dropdown-select--floating { .dropdown-select__language.dropdown-select--floating {
position: fixed; position: absolute;
bottom: 10px; bottom: 10px;
:root[dir="ltr"] & { :root[dir="ltr"] & {
right: 44px; right: 44px;
@ -426,7 +427,7 @@ button,
} }
.help-icon { .help-icon {
position: fixed; position: absolute;
cursor: pointer; cursor: pointer;
fill: $oc-gray-6; fill: $oc-gray-6;
bottom: 14px; bottom: 14px;
@ -455,7 +456,7 @@ button,
} }
.github-corner { .github-corner {
position: fixed; position: absolute;
top: 0; top: 0;
z-index: 2; z-index: 2;
:root[dir="ltr"] & { :root[dir="ltr"] & {