Skip to content

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

3.5 KB
Raw Blame
:root {
  --gamepad-focus-ring: var(--accent, var(--navbar-accent));
}

/* Themes set --accent on the body; declare the ring there so Hexa and high
   contrast keep their own accent. :root stays as a fallback. */
body {
  --gamepad-focus-ring: var(--accent, var(--navbar-accent));
}

/* The yellow accent loses contrast on the warm light theme. Use its dark
   counterpart for the controller ring there. */
body.heroicHexaLight {
  --gamepad-focus-ring: var(--color-hexa-yellow-700, var(--accent));
}

.SettingRow {
  display: flex;
  width: 100%;
  min-width: 0;
  text-align: start;
  /* room for the sticky settings header/tabs when scrolled into view */
  scroll-margin-block-start: 120px;
}

.SettingRow--inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 32px;
}

.SettingRow--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
}

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

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

.SettingRow__label {
  display: flex;
  align-items: center;
  gap: var(--space-xs-fixed);
  min-width: 0;
  font-family: var(--primary-font-family);
  font-size: var(--body-md);
  font-weight: var(--regular);
  line-height: var(--leading-snug, 1.3);
  color: var(--on-panel, var(--text-default));
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.SettingRow__description {
  font-family: var(--primary-font-family);
  font-size: var(--body-sm);
  line-height: var(--leading-normal, 1.5);
  color: var(--on-panel-muted, var(--text-secondary));
}

.SettingRow--inline > .SettingRow__control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.SettingRow--stacked > .SettingRow__control {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
}

.SettingRow--stacked > .SettingRow__control > * {
  flex: 1;
  min-width: 0;
}

.SettingRow--stacked > .SettingRow__control > .Button {
  flex: 0 0 auto;
}

/* Gamepad navigation paints the focused row and its control. The row class is
   only added by the controller focus helpers, so keyboard focus keeps its own
   ring without the accent tint. */
body.gamepad-active .SettingRow.gamepad-focus {
  border-radius: var(--radius-sm);
  background-color: color-mix(
    in oklab,
    var(--accent, var(--navbar-accent)) 8%,
    transparent
  );
}

body.gamepad-active [data-gamepad-focused] {
  outline: 3px solid var(--gamepad-focus-ring);
  outline-offset: 2px;
}

body.gamepad-active
  .SettingRow.gamepad-focus
  .ToggleSwitch__input:focus
  + .ToggleSwitch__track {
  outline: 3px solid var(--gamepad-focus-ring);
  outline-offset: 2px;
}

/* Shared by the Settings page and the eager settings modal: stack the manual
   sync row when its container is narrow (the modal is narrower than the
   viewport). */
.settingsManualSyncRowContainer {
  container-type: inline-size;
  width: 100%;
}

@container (max-width: 600px) {
  .SettingRow.settingsManualSyncRow {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .SettingRow.settingsManualSyncRow > .SettingRow__control {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .SettingRow.settingsManualSyncRow .SettingRow__description {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}