better-xcloud/src/assets/css/stream-stats.styl
2024-12-11 18:08:28 +07:00

186 lines
4.1 KiB
Stylus
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* STATS BADGE */
.bx-badges {
margin-left: 0px;
user-select: none;
-webkit-user-select: none;
}
.bx-badge {
border: none;
display: inline-block;
line-height: 24px;
color: #fff;
font-family: var(--bx-title-font-semibold);
font-size: 14px;
font-weight: 400;
margin: 0 8px 8px 0;
box-shadow: 0px 0px 6px #000;
border-radius: 4px;
}
.bx-badge-name {
background-color: #2d3036;
border-radius: 4px 0 0 4px;
svg {
width: 16px;
height: 16px;
}
}
.bx-badge-value {
background-color: grey;
border-radius: 0 4px 4px 0;
}
.bx-badge-name, .bx-badge-value {
display: inline-block;
padding: 0 8px;
/* height: 30px; */
line-height: 30px;
vertical-align: bottom;
}
.bx-badge-battery[data-charging=true] span:first-of-type::after {
content: ' ';
}
div[class^=StreamMenu-module__container] .bx-badges {
position: absolute;
max-width: 500px;
}
#gamepass-dialog-root .bx-badges {
position: fixed;
top: 60px;
left: 460px;
max-width: 500px;
@media (min-width: 568px) and (max-height: 480px) {
position: unset;
top: unset;
left: unset;
margin: 8px 0;
}
@media (min-width: 480px) and (min-height: calc(481px)) {
}
}
/* STATS BAR */
.bx-stats-bar {
display: flex;
flex-direction: row;
gap: 8px;
user-select: none;
-webkit-user-select: none;
position: fixed;
top: 0;
background-color: #000;
color: #fff;
font-family: var(--bx-monospaced-font);
font-size: 0.9rem;
padding-left: 8px;
z-index: var(--bx-stats-bar-z-index);
text-wrap: nowrap;
&[data-stats*="[time]"] > .bx-stat-time,
&[data-stats*="[play]"] > .bx-stat-play,
&[data-stats*="[batt]"] > .bx-stat-batt,
&[data-stats*="[fps]"] > .bx-stat-fps,
&[data-stats*="[ping]"] > .bx-stat-ping,
&[data-stats*="[jit]"] > .bx-stat-jit,
&[data-stats*="[btr]"] > .bx-stat-btr,
&[data-stats*="[dt]"] > .bx-stat-dt,
&[data-stats*="[pl]"] > .bx-stat-pl,
&[data-stats*="[fl]"] > .bx-stat-fl,
&[data-stats*="[dl]"] > .bx-stat-dl,
&[data-stats*="[ul]"] > .bx-stat-ul {
display: inline-flex;
align-items: baseline;
}
&[data-stats$="[time]"] > .bx-stat-time,
&[data-stats$="[play]"] > .bx-stat-play,
&[data-stats$="[batt]"] > .bx-stat-batt,
&[data-stats$="[fps]"] > .bx-stat-fps,
&[data-stats$="[ping]"] > .bx-stat-ping,
&[data-stats$="[jit]"] > .bx-stat-jit,
&[data-stats$="[btr]"] > .bx-stat-btr,
&[data-stats$="[dt]"] > .bx-stat-dt,
&[data-stats$="[pl]"] > .bx-stat-pl,
&[data-stats$="[fl]"] > .bx-stat-fl,
&[data-stats$="[dl]"] > .bx-stat-dl,
&[data-stats$="[ul]"] > .bx-stat-ul {
border-right: none;
}
&::before {
display: none;
content: '👀';
vertical-align: middle;
margin-right: 8px;
}
&[data-display=glancing]::before {
display: inline-block;
}
&[data-position=top-left] {
left: 0;
border-radius: 0 0 4px 0;
}
&[data-position=top-right] {
right: 0;
border-radius: 0 0 0 4px;
}
&[data-position=top-center] {
transform: translate(-50%, 0);
left: 50%;
border-radius: 0 0 4px 4px;
}
&[data-shadow=true] {
background: none;
filter: drop-shadow(1px 0 0 #000000f0) drop-shadow(-1px 0 0 #000000f0) drop-shadow(0 1px 0 #000000f0) drop-shadow(0 -1px 0 #000000f0);
}
> div {
display: none;
border-right: 1px solid #fff;
padding-right: 8px;
}
label {
margin: 0 8px 0 0;
font-family: var(--bx-title-font);
font-size: 70%;
font-weight: bold;
vertical-align: middle;
cursor: help;
}
span {
display: inline-block;
text-align: right;
vertical-align: middle;
white-space: pre;
&[data-grade=good] {
color: #6bffff;
}
&[data-grade=ok] {
color: #fff16b;
}
&[data-grade=bad] {
color: #ff5f5f;
}
}
}