Skip to content

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.

5.6 KB
Raw Blame
.DownloadItem {
  display: grid;
  /* no width here: the rows carry negative inline margins, so they have to
     stretch past the card padding like the column labels do */
  text-align: start;
  font-family: var(--primary-font-family);
  color: var(--on-panel, var(--text-default));
}

.DownloadItem__game {
  grid-area: game;
  display: flex;
  align-items: center;
  gap: var(--space-sm-fixed);
  min-width: 0;
}

.DownloadItem__position {
  flex-shrink: 0;
  min-width: 2ch;
  font-size: var(--body-md);
  font-variant-numeric: tabular-nums;
  color: var(--on-panel-faint, var(--text-secondary));
}

.DownloadItem__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--input-background);
  color: var(--on-panel-faint, var(--text-secondary));
  cursor: pointer;
}

.DownloadItem__cover--static {
  cursor: default;
}

.DownloadItem__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.DownloadItem__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs-fixed);
  min-width: 0;
}

.DownloadItem__titleRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs-fixed);
  min-width: 0;
}

.DownloadItem__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--body-lg);
  font-weight: var(--medium);
  line-height: var(--leading-snug, 1.3);
  color: var(--on-panel, var(--text-default));
  cursor: pointer;
  transition: color 150ms ease;
}

.DownloadItem__title:hover,
.DownloadItem__title:focus-visible {
  color: var(--on-panel-link, var(--accent));
}

.DownloadItem__title--static {
  cursor: default;
}

.DownloadItem__title--static:hover {
  color: var(--on-panel, var(--text-default));
}

.DownloadItem__details {
  font-size: var(--body-sm);
  color: var(--on-panel-muted, var(--text-secondary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.DownloadItem__type {
  grid-area: type;
}

.DownloadItem__store {
  grid-area: store;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.DownloadItem__store .StoreBadge {
  width: 36px;
  height: 36px;
  padding: var(--space-2xs-fixed);
}

.DownloadItem__time {
  grid-area: time;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs-fixed);
  font-size: var(--body-sm);
  font-variant-numeric: tabular-nums;
  color: var(--on-panel-muted, var(--text-secondary));
  white-space: nowrap;
}

.DownloadItem__time svg {
  color: var(--on-panel-faint, var(--text-secondary));
}

.DownloadItem__status {
  grid-area: status;
  display: inline-flex;
  align-items: center;
}

.DownloadItem__actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs-fixed);
}

.DownloadItem__noAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: var(--on-panel-faint, var(--text-secondary));
}

.DownloadItem--canceled .DownloadItem__title,
.DownloadItem--canceled .DownloadItem__cover img {
  opacity: 0.75;
}

/* Rows inside the queue and completed lists */

.DownloadItem--row {
  grid-template-columns: var(--dm-columns);
  grid-template-areas: 'game type store time actions';
  align-items: center;
  gap: var(--space-md-fixed);
  padding: var(--space-sm-fixed) var(--space-xs-fixed);
  margin-inline: calc(var(--space-xs-fixed) * -1);
  border-radius: var(--radius-sm);
  transition: background-color 150ms ease;
}

.DownloadList--finished .DownloadItem--row {
  grid-template-areas: 'game status type store time actions';
}

.DownloadItem--row:hover,
.DownloadItem--row:focus-within {
  background: var(--input-background);
}

/* The hero card for the download in progress */

.DownloadItem--hero {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'game';
  align-items: start;
}

.DownloadItem--hero .DownloadItem__actions {
  align-self: flex-start;
  justify-content: flex-start;
  margin-block-start: var(--space-md-fixed);
}

.DownloadItem--hero .DownloadItem__game {
  gap: var(--space-md-fixed);
  align-items: flex-start;
}

.DownloadItem--hero .DownloadItem__cover {
  position: relative;
  width: 136px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
}

.DownloadItem__coverStore {
  position: absolute;
  top: var(--space-xs-fixed);
  left: var(--space-xs-fixed);
  width: 32px;
  height: 32px;
  padding: 6px;
}

.DownloadItem--hero .DownloadItem__text {
  flex: 1 1 auto;
  gap: var(--space-2xs-fixed);
}

.DownloadItem--hero .DownloadItem__text > .Badge {
  align-self: flex-start;
}

.DownloadItem--hero .DownloadItem__title {
  font-size: var(--title-md);
  white-space: normal;
  overflow: visible;
}

.DownloadItem__progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs-fixed);
  width: 100%;
  margin-block-start: 0;
}

.DownloadItem__progressSummary {
  align-self: flex-end;
  font-size: var(--body-sm);
  font-variant-numeric: tabular-nums;
  color: var(--on-panel-muted, var(--text-secondary));
}

@container main-content (max-width: 900px) {
  .DownloadItem--row {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      'game game game actions'
      'type store time .';
    row-gap: var(--space-xs-fixed);
    column-gap: var(--space-sm-fixed);
  }

  .DownloadList--finished .DownloadItem--row {
    grid-template-columns: auto auto auto minmax(0, 1fr);
    grid-template-areas:
      'game game game actions'
      'status type store time';
  }
}

@container main-content (max-width: 620px) {
  .DownloadItem--hero .DownloadItem__cover {
    width: 96px;
  }
}