@use 'sass:color'; @use 'sass:math'; // Colors related to torrent status $blue-100: #51b3f7; $blue-200: #357aaa; $blue-300: #2c7fea; $blue-400: #1847d4; $green-100: #26aa55; $green-300: #7cef99; $green-400: #67c87f; $green-500: #34dc70; $grey-200: #e1e4e8; $grey-500: #828282; $grey-900: #191919; $red-500: #d73a49; $white: #fff; $black: #000; $dark-mode-white: #c9d1d9; $yellow-300: #ffea7f; $grey-40: #666; $nice-grey: #f8f8f8; $dark-mode-black: #121212; $default-accent-color-dark: #0c2d6b; $default-border-dark: #575757; $default-border-light: #aeaeae; $default-tinted: rgba(128, 128, 144, 0.125); // Z-INDEX ENUM // $z-index-progressbar: 1; $z-index-popup: 2; // ICONS -- see assets/img/README.md for sources and license details // Are you a designer? New icon PRs welcomed! $image-alt-speed-disabled: '../img/modern-tortoise.png'; $image-alt-speed-enabled: '../img/modern-tortoise-blue.png'; $image-baseline: '../img/horizontal-rule.svg'; $image-chevron-dn: '../img/chevron-down.svg'; $image-chevron-up: '../img/chevron-up.svg'; $image-lock-fill: '../img/lock-fill.svg'; $image-magnet: '../img/magnet.svg'; $image-pause-circle-active: '../img/pause-circle-active.svg'; $image-pause-circle-idle: '../img/pause-circle-idle.svg'; $image-play-circle-active: '../img/play-circle-active.svg'; $image-play-circle-idle: '../img/play-circle-idle.svg'; /// MIXINS @mixin for-phone-only { @media (max-width: 599px) { @content; } } @mixin for-tablet-portrait-up { @media (min-width: 600px) { @content; } } @mixin button { border: 1px solid var(--color-border); cursor: pointer; display: inline-block; padding: 3px; user-select: none; -webkit-user-select: none; } /// GLOBAL :root { --progress: 100%; --color-fg-error: #{$red-500}; --color-fg-port-closed: #{$red-500}; --color-fg-port-open: #{$green-100}; --color-progressbar-background-2: #{$green-400}; --color-progressbar-verify: #{$yellow-300}; --color-progressbar-magnet: #{$yellow-300}; --color-progressbar-paused: #{$grey-200}; --color-progressbar-leech: #{$blue-200}; --color-progressbar-queued: #{$blue-400}; --color-bg-even: #{$default-tinted}; --color-toolbar-background: #{$default-tinted}; --color-bg-tabs: #{$default-tinted}; color-scheme: light dark; @media (prefers-color-scheme: dark) { --color-bg-odd: #{$black}; --color-bg-primary: #{$black}; --color-bg-popup: #{$black}; --color-bg-hover: #{$grey-40}; --color-fg-primary: #{$dark-mode-white}; --color-fg-secondary: #{$nice-grey}; --color-fg-on-popup: #{$nice-grey}; --color-fg-disabled: #{$dark-mode-white}; --color-bg-warn: #cf6679; --color-fg-warn: #{$dark-mode-black}; --color-border: #{$dark-mode-white}; --color-border-selected: #{$grey-500}; --color-fg-tertiary: #{$grey-500}; --color-bg-selected: #{$default-accent-color-dark}; --color-default-border: #{$default-border-dark}; --color-progressbar-seed-1: #{$green-100}; --color-progressbar-seed-2: #{$green-400}; --color-progressbar-paused: #{$grey-500}; --color-progressbar-leech: #{$blue-200}; --color-progressbar-seed-paused: #{$grey-500}; .contrast-more { --color-fg-error: #{$red-500}; --color-fg-port-closed: #{$red-500}; --color-fg-port-open: #{$green-100}; --color-bg-hover: #{$grey-40}; --color-fg-primary: #{$white}; --color-bg-even: #{$black}; --color-fg-secondary: #{$white}; --color-fg-on-popup: #{$white}; --color-fg-disabled: #{$white}; --color-bg-warn: #cf6679; --color-fg-warn: #{$black}; --color-border: #{$white}; --color-border-selected: #{$white}; --color-fg-tertiary: #{$white}; --color-toolbar-background: #{$black}; --color-bg-selected: #{$blue-300}; --color-bg-tabs: #{$black}; --color-fg-tabs: #{$white}; --color-default-border: #{$white}; --color-progressbar-seed-1: #{$black}; --color-progressbar-seed-2: #{$white}; --color-progressbar-seed-paused: #{$grey-500}; --color-progressbar-background-2: #{$white}; --color-progressbar-verify: #{$yellow-300}; --color-progressbar-magnet: #{$yellow-300}; --color-progressbar-paused: #{$grey-500}; --color-progressbar-leech: #{$blue-200}; --color-progressbar-queued: #{$blue-400}; } } @media (prefers-color-scheme: light) { --color-bg-odd: #{$white}; --color-bg-primary: #{$white}; --color-bg-popup: #{$white}; --color-fg-error: #{$red-500}; --color-fg-port-closed: #{$red-500}; --color-fg-port-open: #{$green-400}; --color-progressbar-verify: #{$yellow-300}; --color-progressbar-magnet: #{$yellow-300}; --color-progressbar-paused: #{$grey-200}; --color-progressbar-leech: #{$blue-100}; --color-progressbar-queued: #{$blue-400}; --color-bg-hover: #{$nice-grey}; --color-fg-primary: #404040; --color-fg-on-popup: #{$grey-900}; --color-fg-secondary: #{$grey-500}; --color-border: #{$grey-500}; --color-border-selected: #d0d7de; --color-fg-tertiary: #{$grey-500}; --color-bg-warn: #e4606d5b; --color-fg-warn: #cf212e; --color-fg-disabled: #{$grey-500}; --color-bg-selected: #{$blue-300}; --color-default-border: #{$default-border-light}; --color-dialog-border: #{$nice-grey}; --color-progressbar-seed-1: #{$green-500}; --color-progressbar-seed-2: #{$green-300}; --color-progressbar-seed-paused: #{$grey-200}; .contrast-more { --color-fg-error: #{$red-500}; --color-fg-port-closed: #{$red-500}; --color-fg-port-open: #{$green-400}; --color-bg-hover: #{$grey-40}; --color-fg-primary: #{$black}; --color-bg-even: #{$white}; --color-fg-secondary: #{$black}; --color-fg-on-popup: #{$black}; --color-fg-disabled: #{$black}; --color-bg-warn: #cf6679; --color-fg-warn: #{$white}; --color-border: #{$black}; --color-border-selected: #{$black}; --color-fg-tertiary: #{$black}; --color-toolbar-background: #{$white}; --color-bg-selected: #{$blue-300}; --color-bg-tabs: #{$white}; --color-fg-tabs: #{$black}; --color-default-border: #{$black}; --color-progressbar-seed-1: #{$black}; --color-progressbar-seed-2: #{$white}; --color-progressbar-seed-paused: #{$grey-500}; --color-progressbar-background-2: #{$white}; --color-progressbar-verify: #{$yellow-300}; --color-progressbar-magnet: #{$yellow-300}; --color-progressbar-paused: #{$grey-500}; --color-progressbar-leech: #{$blue-200}; --color-progressbar-queued: #{$blue-400}; } } } /* If browser can support using 'system color' keywords (i.e. way to inherit browser colors), use these variables instead */ @supports (background-color: Canvas) { :root { .contrast-less { --color-bg-odd: Canvas; --color-bg-primary: Canvas; --color-bg-popup: Canvas; } } } html, body { background-color: var(--color-bg-primary); color: var(--color-fg-primary); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; height: 100%; margin: 0; } img { border: 0; } a { color: var(--color-fg-primary); outline: 0; text-decoration: underline; } .hidden { display: none; } .mainwin { display: flex; flex-direction: column; height: 100%; position: relative; > * { margin: 0; padding: 0; } } .mainwin-workarea { display: flex; flex: 1; flex-direction: row; overflow: auto; } /// TOOLBAR $toolbar-height-number: 50; $toolbar-height: $toolbar-height-number * 1px; #mainwin-toolbar { align-items: center; background: var(--color-toolbar-background); border-bottom: 1px solid var(--color-default-border); display: flex; flex-direction: row; height: $toolbar-height; margin: 0; width: 100%; button { background-color: transparent; background-position: center; background-repeat: no-repeat; border: 0; border-radius: 5px; cursor: pointer; height: $toolbar-height; margin-right: 6px; user-select: none; -webkit-user-select: none; width: $toolbar-height; svg { stroke: var(--color-fg-primary); } svg g path { fill: var(--color-fg-primary); } &:disabled { cursor: default; svg { stroke: var(--color-fg-disabled); } svg g path { fill: var(--color-fg-disabled); } } } > .toolbar-separator { border-left: 1px solid var(--color-default-border); height: 25px; margin: 0 6px 0 0; } :nth-last-child(2) { border: 0; flex-grow: 1; } } .toolbar-icon { stroke: var(--color-fg-primary); } #toolbar-overflow { margin-right: 4px; svg { fill: var(--color-fg-primary); height: 36px; width: 36px; } &.alt-speed-enabled { background-image: url($image-alt-speed-enabled); background-position: bottom left; background-size: 20px; } } /// FILTERBAR .mainwin-filterbar { white-space: nowrap; align-items: center; background: var(--color-toolbar-background); border-bottom: 1px solid var(--color-default-border); display: flex; flex-direction: row; height: 30px; padding-left: 5px; @include for-phone-only { :not(select):not(input):not(option):not(.flexible-space) { display: none; } } #torrent-search { width: 100%; max-width: 160px; } select { width: 70px; } > * { margin-right: 5px; } } $speed-icon-size: 20px; .speed-up-icon, .speed-dn-icon { fill: var(--color-fg-primary); svg { width: $speed-icon-size; } } #speed-dn-label, #speed-up-label { text-align: right; } /// TORRENT CONTAINER $pauseresume-size-number: 20; $pauseresume-size: $pauseresume-size-number * 1px; $progressbar-border: 1; $progressbar-height: 20; $popup-top: 51px; // TODO: ugly that this is hardcoded .flexible-space { margin-right: auto; } #torrent-container { flex-grow: 1; left: 0; margin: 0; overflow: auto; padding: 0; right: 0; } .torrent-container { background-color: $white; } $app-image: '../img/box.svg'; $audio-image: '../img/music.svg'; $folder-image: '../img/folder.svg'; $font-image: '../img/type.svg'; $image-image: '../img/image.svg'; $package-image: '../img/package.svg'; $text-image: '../img/file-text.svg'; $video-image: '../img/film.svg'; @mixin mime-icon-compact($mime-icon) { &[data-icon-multifile='true'] { background-image: url($folder-image); background-position: center; background-size: 16px; } } @mixin mime-icon($mime-icon) { // background-image: url($mime-icon); background-color: var(--color-fg-primary); -webkit-mask-image: url($mime-icon); mask-image: url($mime-icon); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; &[data-icon-multifile='true'] { -webkit-mask-image: url($mime-icon), url($folder-image); mask-image: url($mime-icon), url($folder-image); -webkit-mask-position: top left, bottom right; mask-position: top left, bottom right; -webkit-mask-repeat: no-repeat, no-repeat; mask-repeat: no-repeat, no-repeat; -webkit-mask-size: 16px, 16px; mask-size: 16px, 16px; } } .torrent-list { cursor: pointer; list-style-type: none; margin: 0; padding: 0; text-align: left; width: 100%; user-select: none; -webkit-user-select: none; .torrent:nth-child(even) { background-color: var(--color-bg-even); } .torrent:nth-child(odd) { background-color: var(--color-bg-odd); } .torrent { border-bottom: 1px solid var(--color-default-border); .icon { // color the background svg fill background-color: var(--color-fg-primary); background-position: center, top left; &[data-icon-mime-type='audio'] { @include mime-icon($audio-image); } &[data-icon-mime-type='application'] { @include mime-icon($app-image); } &[data-icon-mime-type='font'] { @include mime-icon($font-image); } &[data-icon-mime-type='image'] { @include mime-icon($image-image); } &[data-icon-mime-type='model'] { @include mime-icon($package-image); } &[data-icon-mime-type='text'] { @include mime-icon($text-image); } &[data-icon-mime-type='video'] { @include mime-icon($video-image); } } .torrent-name { font-weight: bold; margin-bottom: 2px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; &.compact { font-size: 1em; font-weight: normal; } &:not(.paused) { color: var(--color-fg-primary); } } .torrent-labels { font-size: x-small; font-weight: normal; margin-bottom: 2px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 0; &.compact { flex: 1; font-size: x-small; } } .torrent-label { padding: 0 8px; margin: 0 2px; border-radius: 1em; border: 1px solid var(--color-default-border); } .torrent-progress-details.error, .torrent-peer-details.error { color: var(--color-fg-error); } .torrent-progress-details, .torrent-peer-details { color: var(--color-fg-primary); font-size: small; } &.compact { $icon-size-num: 16; $icon-size: $icon-size-num * 1px; align-items: center; display: flex; flex-direction: row-reverse; .icon { flex-shrink: 0; height: $icon-size; -webkit-mask-size: $icon-size, $icon-size-num * 0.5px; mask-size: $icon-size, $icon-size-num * 0.5px; width: $icon-size; &[data-icon-multifile='true'] { @include mime-icon($folder-image); } } > * { margin: 5px; } } &:not(.compact) { $icon-size-num: 32; $icon-size: $icon-size-num * 1px; align-items: center; display: grid; grid-column-gap: 12px; grid-template-areas: 'icon name labels' 'icon progress-text progress-text' 'icon progressbar progressbar' 'icon peers peers'; grid-template-columns: $icon-size auto 1fr; padding: 6px 12px; .icon { background-size: $icon-size, $icon-size-num * 0.5px; grid-area: icon; height: $icon-size; width: $icon-size; } .torrent-name { color: var(--color-fg-primary); grid-area: name; &.paused { color: var(--color-fg-disabled); } } .torrent-labels { grid-area: labels; } .torrent-peer-details { grid-area: peers; } .torrent-progress { display: flex; flex-direction: row; grid-area: progressbar; } .torrent-progress-details { grid-area: progress-text; } > * { margin: 1px 0; } } &.selected { background-color: var(--color-bg-selected); } } .icon { background-position: center; background-repeat: no-repeat; } .torrent-pauseresume-button { background-position: center center; background-repeat: no-repeat; background-size: $pauseresume-size; margin-left: math.floor(math.div($pauseresume-size-number, 2)) * 1px; width: $pauseresume-size; &[data-action='pause'] { background-image: url($image-pause-circle-idle); &:active, &:hover { background-image: url($image-pause-circle-active); } } &[data-action='resume'] { background-image: url($image-play-circle-idle); &:active, &:hover { background-image: url($image-play-circle-active); } } } .torrent-progress-bar { background-repeat: no-repeat; border-color: var(--color-border-selected); border-radius: 3px; border-style: solid; border-width: 1px; height: ($progressbar-height - ($progressbar-border * 2)) * 1px; &.full { flex-grow: 1; margin: 2px 0; } &.compact { min-width: 50px; width: 10vw; } &.leech.queued { background: linear-gradient( to right, var(--color-progressbar-queued) 0, var(--color-progressbar-queued) var(--progress, 30%), transparent var(--progress, 30%) ), no-repeat; } &.leech { background: linear-gradient( to right, var(--color-progressbar-leech) 0, var(--color-progressbar-leech) var(--progress, 30%), transparent var(--progress, 30%) ), no-repeat; } &.magnet { background: linear-gradient( to right, var(--color-progressbar-magnet) 0, var(--color-progressbar-magnet) var(--progress, 30%), transparent var(--progress, 30%) ), no-repeat; } &.seed.paused { background-color: var(--color-progressbar-seed-paused); } &.seed:not(.paused) { background: linear-gradient( to right, var(--color-progressbar-seed-1) 0, var(--color-progressbar-seed-1) var(--progress, 30%), var(--color-progressbar-seed-2) var(--progress, 30%) ), no-repeat; } &.seed.queued { background-color: var(--color-progressbar-seed-paused); } &.verify { background: linear-gradient( to right, var(--color-progressbar-verify) 0, var(--color-progressbar-verify) var(--progress, 30%), transparent var(--progress, 30%) ), no-repeat; } &.paused { background: linear-gradient( to right, var(--color-progressbar-paused) 0, var(--color-progressbar-paused) var(--progress, 30%), transparent var(--progress, 30%) ), no-repeat; } } } /// PREFERENCES DIALOG @include for-phone-only { input[type='checkbox'] { height: 20px; width: 20px; } } #inspector, #prefs-dialog { @include for-phone-only { left: 0; } @include for-tablet-portrait-up { border-left: 1px solid var(--color-default-border); width: 570px; } } #prefs-dialog { $background-color: var(--color-bg-primary); background: $background-color; bottom: 0; box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d; position: absolute; right: 0; top: $popup-top; z-index: $z-index-popup; .tabs-page { grid-column-gap: 8px; grid-row-gap: 5px; grid-template-columns: 1fr 1fr; margin: 20px; &:not(.hidden) { display: grid; } .section-label { font-weight: bold; grid-column: span 2; // margin-left: -20px; padding-bottom: 5px; &:not(:first-of-type) { margin-top: 20px; } } } .alt-speed-section-label { background: transparent url($image-alt-speed-enabled) no-repeat; background-position: left; background-position-y: 4px; background-size: 20px; padding-left: 22px; } :disabled, .disabled { color: var(--color-fg-disabled); } #alt-times-div, #autostart-div, #port-forwarding, #randomize-port, #suffix-div, #use-dht-div, #use-lpd-div, #use-pex-div, #utp-enabled, .alt-speed-label { grid-column: span 2; } #default-trackers { height: 300px; } .blocklist-size-label, .blocklist-update-button, .register-handler-button, .port-status { grid-column: 2 / 3; } .blocklist-size-label { font-size: smaller; } .blocklist-size-number { font-weight: bolder; } .port-status-label { display: inline-block; font-weight: bold; margin-left: 5px; &[data-open='true'] { color: var(--color-fg-port-open); } &[data-open='false'] { color: var(--color-fg-port-closed); } } #default-trackers, .default-trackers-label { grid-column: 1 / 3; } .alt-speed-label { font-size: smaller; font-style: lighter; // nudge it up next to the section label margin: -10px 0 10px; } } #prefs-dialog.ui-tabs .ui-tabs-panel { padding: 0; user-select: none; -webkit-user-select: none; } .prefs-section { text-align: left; > * { padding: 0 8px 8px; } .title { color: var(--color-fg-primary); font-size: larger; font-weight: bold; margin-bottom: 10px; padding-left: 0; } .row { .key { float: left; padding-top: 3px; > * { margin-left: 0; } } .value { margin-left: 150px; > * { width: 100%; } } } } /// TABS .tabs-container { align-items: stretch; background: var(--color-bg-primary); bottom: 0; display: flex; flex-direction: column; position: absolute; right: 0; top: $popup-top; z-index: $z-index-popup; @include for-phone-only { left: 0; } @include for-tablet-portrait-up { width: 550px; } } .tabs-container-close { font-size: 150%; cursor: pointer; background: var(--color-bg-primary); border: 0; color: var(--color-fg-primary); position: absolute; padding: 10px 16px; } .tabs-buttons { align-self: center; background-color: var(--color-bg-tabs); border: 1px solid var(--color-border-selected); border-radius: 6px; display: flex; margin: 10px 0; button { appearance: none; border: 1px solid transparent; border-radius: 6px; color: var(--color-fg-primary); font-weight: 400; } } .tabs-pages { box-sizing: border-box; flex: 1; overflow-x: hidden; overflow-y: auto; @include for-phone-only { padding: 0 8px 20px; } @include for-tablet-portrait-up { padding: 0 20px 20px; } } .tabs-button { background: none; border: 1px solid transparent; font-size: 14px; padding: 3px 8px; &:active, &:checked, &.selected { background-color: var(--color-bg-odd); border: 1px solid var(--color-fg-primary); border-radius: 5px; } } /// INSPECTOR #inspector { box-shadow: 0 3px 6px rgba(58, 58, 58, 0.7); } .inspector-info-page { font-size: 14px; // TODO: this is (mostly) copied from prefs-dialog. // can it be folded into a single set of rules? grid-column-gap: 8px; grid-row-gap: 8px; grid-template-columns: auto 1fr; margin: 20px; padding: 12px; &:not(.hidden) { display: grid; } .section-label { font-size: 16px; font-weight: bold; grid-column: span 2; padding-bottom: 5px; &:not(:first-of-type) { margin-top: 20px; } } label { font-weight: 500; } :not(.section-label) { // this section is not copied overflow-x: hidden; text-overflow: ellipsis; } } .inspector-info-magnet { button { background-color: var(--color-border); background-position: top; background-repeat: no-repeat; border: 0; cursor: pointer; height: 1rem; -webkit-mask: url($image-magnet) no-repeat center / 14px; mask: url($image-magnet) no-repeat center / 14px; vertical-align: middle; width: 1rem; } } #inspector .tabs-button, #prefs-dialog .tabs-button { height: 30px; margin: 0; min-width: 40px; } #inspector-file-list { margin: 0; padding: 0; .inspector-torrent-file-list-entry:nth-child(even) { background-color: var(--color-bg-even); } .inspector-torrent-file-list-entry:nth-child(odd) { background-color: var(--color-bg-odd); } .inspector-torrent-file-list-entry { display: grid; grid-column-gap: 5px; grid-template-areas: 'check name priority' 'blank1 info blank2'; grid-template-columns: 20px 1fr 65px; margin-bottom: 4px; padding: 5px; &.skip { opacity: 0.5; } } .file-wanted-control { grid-area: check; } .inspector-torrent-file-list-entry-name { color: var(--color-fg-primary); cursor: pointer; font-size: 14px; grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .inspector-torrent-file-list-entry.skip > .inspector-torrent-file-list-entry-name { color: var(--color-fg-disabled); } .inspector-torrent-file-list-entry-progress { color: var(--color-fg-secondary); font-size: 12px; grid-area: info; } .single-file .inspector-torrent-file-list-entry > .file-wanted-control, .inspector-torrent-file-list-entry.complete > .file-wanted-control { cursor: default; } } #inspector-header { margin: 8px 0; } #torrent-inspector-name { font-size: large; font-weight: bold; } #inspector-tiers-list { color: var(--color-fg-primary); margin: 0 10px; padding: 0; .tier-list-row { display: grid; font-size: 12px; grid-column-gap: 8px; grid-row-gap: 4px; padding: 8px 12px; } .tier-list-row:nth-child(even of .tier-list-row) { background-color: var(--color-bg-even); } .tier-list-row:nth-child(odd of .tier-list-row) { background-color: var(--color-bg-odd); } .tier-list-torrent { color: var(--color-fg-primary); font-weight: bolder; overflow-x: hidden; padding-top: 12px; padding-bottom: 8px; text-overflow: ellipsis; white-space: nowrap; } .tier-list-tracker { font-size: 14px; font-weight: bolder; grid-column: span 2; padding-bottom: 4px; } .tier-announce, .tier-scrape, .tier-state { text-align: left; } .tier-downloads, .tier-leechers, .tier-seeders { text-align: right; } } // Peers Tab .peer-list { $table-border: 1px solid var(--color-default-border); border: $table-border; border-collapse: collapse; cursor: default; table-layout: fixed; text-align: left; width: 100%; td, th { font-size: smaller; padding: 5px; } td { border: $table-border; color: var(--color-fg-secondary); // padding: 5px 10px; } .torrent-row td { background: var(--color-bg-odd); color: var(--color-fg-primary); font-size: normal; font-weight: bolder; overflow-x: hidden; padding: 10px; text-overflow: ellipsis; white-space: nowrap; } .encryption { &[data-encrypted='true'] { background-color: var(--color-border-selected); -webkit-mask: url($image-lock-fill) no-repeat center / 14px; mask: url($image-lock-fill) no-repeat center / 14px; width: 10px; } } .peer-address, .percent-done, .speed-down, .speed-up { text-align: right; } .percent-done { width: 10%; @include for-phone-only { width: 12%; } } .speed-down, .speed-up { width: 15%; } .peer-address { width: 25%; overflow-x: hidden; text-overflow: ellipsis; @include for-phone-only { text-align: left; width: 20%; } } .peer-app-name { overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap; @include for-tablet-portrait-up { width: 20%; } } .status { cursor: pointer; width: 10%; } } /// FILE PRIORITY BUTTONS .file-priority-radiobox { grid-area: priority; > * { appearance: none; background-color: var(--color-border-selected); background-position: center; background-repeat: no-repeat; background-size: 10px, 20px; border: 1px solid var(--color-border); border-radius: 0; height: 20px; margin: 0; padding: 0; width: 20px; } > .low { background-image: url($image-chevron-dn); border-right-width: 0; } > .normal { background-image: url($image-baseline); } > .high { background-image: url($image-chevron-up); border-left-width: 0; } //if input is checked then change the background color > .checked { background-color: var(--color-bg-hover); } } /// CONTEXT MENU .context-menu { $disabled-color: var(--color-fg-disabled); background-color: var(--color-bg-primary); border-radius: 5px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7); color: var(--color-fg-on-popup); padding: 10px 5px; position: absolute; z-index: 9999; user-select: none; -webkit-user-select: none; .context-menuitem { font-size: 13px; font-weight: 400; list-style: none; padding: 5px 15px; &:hover:not(:disabled), &:focus:not(:disabled) { background-color: var(--color-bg-hover); border-radius: 6px; cursor: pointer; font-weight: 500; } &:disabled { color: $disabled-color; cursor: none; } &.warning:hover { background-color: var(--color-bg-warn); color: var(--color-fg-warn); } } } .context-menu-separator { border-bottom: 1px solid var(--color-fg-secondary); margin-bottom: 10px; padding-bottom: 10px; } /// OVERFLOW MENU .overflow-menu { background: var(--color-bg-popup); border-radius: 5px; box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d; color: var(--color-fg-on-popup); overflow: auto; padding: 10px; position: absolute; right: 0; margin: 6px; top: 50px; z-index: $z-index-popup; @include for-phone-only { height: 80vh; } fieldset { border: 0; display: block; margin: 8px 0; } fieldset ul { margin: 0; padding-left: 0; li { list-style-type: none; } a { cursor: pointer; } } .table-row { align-items: center; border-radius: 6px; display: flex; flex-direction: row; padding: 3px 0; } legend { color: var(--color-fg-primary); font-weight: bolder; margin: 12px 0 4px; } button, label { color: var(--color-fg-primary); display: inline-flex; font-size: 1em; width: 100%; } button { background: transparent; border: 0; cursor: pointer; display: block; padding: 4px 0; text-align: left; text-decoration: none; width: 150px; } .input-and-label { align-items: center; display: inline-flex; flex-direction: row; } #display-options { display: flex; flex-direction: column; } #speed-options { display: flex; flex-direction: column; > .speed-up, > .speed-down { align-items: center; display: flex; flex-direction: row; padding: 4px 0; > label { overflow: hidden; width: 80px; } } .alt-speed { display: grid; grid-column-gap: 5px; grid-row-gap: 5px; grid-template-areas: 'check lb' 'turtle values'; grid-template-columns: 22px 1fr; margin-bottom: 4px; } #alt-speed-check { grid-area: check; &:checked ~ #alt-speed-image { background-image: url($image-alt-speed-enabled); background-position: left; background-size: 22px; } &:not(:checked) ~ #alt-speed-image { background-image: url($image-alt-speed-disabled); background-size: 22px; } } #alt-speed-image { background-position: center; background-repeat: no-repeat; grid-area: turtle; } #alt-speed-label { grid-area: lb; } #alt-speed-values-label { font-size: small; grid-area: values; } } } /// DIALOGS $dialog-padding-number: 20; $dialog-logo-padding-number: math.div($dialog-padding-number * 2, 3); $logo-size: 64px; @include for-phone-only { .dialog-buttons { padding-top: $dialog-logo-padding-number * 1px; } .dialog-container { opacity: 96%; position: absolute; top: $popup-top; width: 100%; } .dialog-logo { padding-bottom: $dialog-logo-padding-number * 1px; } .dialog-window { align-items: center; display: flex; flex-direction: column; } } @include for-tablet-portrait-up { .dialog-container { min-width: 500px; position: absolute; top: $popup-top * 2; } .dialog-heading { grid-area: heading; } .dialog-logo { grid-area: icon; padding-right: $dialog-logo-padding-number * 1px; } .dialog-window { background-color: var(--color-bg-popup); color: var(--color-fg-on-popup); display: grid; grid-column-gap: 12px; grid-template-areas: 'icon heading' 'icon message' 'icon workarea' 'icon buttons'; grid-template-columns: $logo-size 1fr; padding: 2px 12px; } } .dialog-buttons { display: flex; float: right; grid-area: buttons; margin: 10px 0 0; text-align: center; button { appearance: none; background: var(--color-bg-primary); border: 1px solid var(--color-default-border); border-radius: 5px; color: var(--color-fg-primary); margin-left: 8px; padding: 8px; text-decoration: none; } } .dialog-buttons-begin { flex-grow: 1; } .dialog-buttons-end { display: none; } dialog { border: 0; } .dialog-container { box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d; color: var(--color-fg-primary); display: block; padding: 0; z-index: $z-index-popup; @include for-tablet-portrait-up { border: 0; border-radius: 8px; max-width: 50%; } } .dialog-heading { align-items: center; display: flex; font-size: 1.2em; font-weight: bold; } .dialog-logo { background: transparent url('../img/logo.png') top left no-repeat; height: $logo-size; width: $logo-size; } .dialog-message { grid-area: message; margin: 10px 0 0; } .dialog-window { background: var(--color-bg-primary); border-radius: 8px; padding: $dialog-padding-number * 1px; } .dialog-workarea { display: flex; flex-direction: column; grid-area: workarea; margin: 10px 0 0; > * { margin-bottom: 5px; } } /// ABOUT DIALOG .about-dialog { max-width: initial; } .about-dialog .dialog-workarea > * { margin-bottom: 10px; } .about-dialog-version-number { margin-left: 4px; } .about-dialog-version-checksum { font-size: small; font-style: italic; font-weight: normal; margin-left: auto; padding-left: 10px; } /// OPEN TORRENT DIALOG .open-torrent { input { margin-bottom: 15px; } #auto-start-label { margin-left: 5px; } input[type='file'] { width: 100%; box-sizing: border-box; } } /// HOTKEYS DIALOG .shortcuts-dialog { table { border-collapse: collapse; width: 100%; } th, td { border: 1px solid var(--color-border); padding: 5px 10px; } } /// RENAME DIALOG #torrent-rename-name { min-width: 400px; } /// SET-LOCATION DIALOG #move-container #torrent-path { min-width: 400px; } /// STATISTICS DIALOG .tabs-pages, .inspector-info-page, .statistics-dialog { .content { column-gap: 16px; display: grid; grid-row-gap: 6px; grid-template-columns: auto 1fr; margin-top: 4px; @include for-phone-only { margin: 4px 0 16px; } @include for-tablet-portrait-up { margin: 4px 16px 16px; } div { word-break: break-word; } } fieldset { border: 0; margin: 0; padding: 0; } legend { font-weight: bolder; margin-bottom: 4px; } } /// UPLOAD DIALOG #free-space-text { display: inline-block; font-size: smaller; font-style: italic; } .ui-menu { width: 200px; } .upload-div { display: none; } .dropzone { background: var(--color-bg-primary); border: 2px dashed var(--color-border); border-radius: 5px; color: var(--color-fg-primary); cursor: pointer; display: flex; flex-direction: column; font-size: 1.2em; font-weight: bold; height: 100%; justify-content: center; margin: 0; padding: 0; text-align: center; width: 100%; }