Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Alignment of current download component when sidebar is collapsed #2933

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.currentDownload {
font-size: var(--text-sm);
padding: var(--space-md) 0;
transition: 300ms;
margin-top: var(--space-sm);

& > .gameTitle {
font-size: var(--text-md);
transition: 600ms;
font-weight: var(--bold);
}

&:hover > .gameTitle {
color: var(--accent-overlay);
transition: 600ms;
}

.downloadStatus {
color: var(--success);
font-family: var(--secondary-font-family);
font-style: italic;
font-weight: normal;
font-size: var(--text-sm);
line-height: var(--text-sm);
}

.MuiLinearProgress-bar1Determinate {
background-color: var(--success);
}

.statusIcon {
display: none;
margin-inline-end: 10px;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the important change in this file, the rest is just that I moved the file to be a scss file

svg {
width: 27px;
height: auto;
color: var(--success);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Box from '@mui/material/Box'
import { getGameInfo } from 'frontend/helpers'
import { hasProgress } from 'frontend/hooks/hasProgress'
import { Runner } from 'common/types'
import './index.css'
import './index.scss'
import { useTranslation } from 'react-i18next'
import ContextProvider from 'frontend/state/ContextProvider'
import Badge from '@mui/material/Badge'
Expand Down
5 changes: 1 addition & 4 deletions src/frontend/components/UI/Sidebar/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@
color: var(--accent-overlay);
}

.currentDownloads .statusIcon {
display: none;
}

.Sidebar.collapsed {
.heroicVersion {
margin: var(--space-sm);
Expand All @@ -166,6 +162,7 @@
}

.currentDownloads {
margin-inline: auto;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just center the element when collapsed instead of having a fixed left margin

.statusIcon {
display: block;
}
Expand Down