mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57:19 +02:00
250 lines
5.2 KiB
Stylus
Executable File
250 lines
5.2 KiB
Stylus
Executable File
button_color(name, normal, hover, active, disabled)
|
|
prefix = unquote('--bx-' + name + '-button');
|
|
{prefix + '-color'}: normal;
|
|
{prefix + '-rgb'}: red(normal), green(normal), blue(normal);
|
|
|
|
{prefix + '-hover-color'}: hover;
|
|
{prefix + '-hover-rgb'}: red(hover), green(hover), blue(hover);
|
|
|
|
{prefix + '-active-color'}: active;
|
|
{prefix + '-active-rgb'}: red(active), green(active), blue(active);
|
|
|
|
{prefix + '-disabled-color'}: disabled;
|
|
{prefix + '-disabled-rgb'}: red(disabled), green(disabled), blue(disabled);
|
|
|
|
|
|
:root {
|
|
--bx-title-font: Bahnschrift, Arial, Helvetica, sans-serif;
|
|
--bx-title-font-semibold: Bahnschrift Semibold, Arial, Helvetica, sans-serif;
|
|
--bx-normal-font: "Segoe UI", Arial, Helvetica, sans-serif;
|
|
--bx-monospaced-font: Consolas, "Courier New", Courier, monospace;
|
|
--bx-promptfont-font: promptfont;
|
|
|
|
--bx-button-height: 40px;
|
|
|
|
button_color('default', #2d3036, #515863, #222428, #8e8e8e);
|
|
button_color('primary', #008746, #04b358, #044e2a, #448262);
|
|
button_color('warning', #c16e04, #fa9005, #965603, #a2816c);
|
|
button_color('danger', #c10404, #e61d1d, #a26c6c, #df5656);
|
|
|
|
--bx-fullscreen-text-z-index: 9999;
|
|
--bx-toast-z-index: 6000;
|
|
--bx-key-binding-dialog-z-index: 5010;
|
|
--bx-key-binding-dialog-overlay-z-index: 5000;
|
|
|
|
--bx-stats-bar-z-index: 4010;
|
|
|
|
--bx-navigation-dialog-z-index: 3010;
|
|
--bx-navigation-dialog-overlay-z-index: 3000;
|
|
|
|
--bx-mkb-pointer-lock-msg-z-index: 2000;
|
|
|
|
--bx-game-bar-z-index: 1000;
|
|
--bx-screenshot-animation-z-index: 200;
|
|
--bx-wait-time-box-z-index: 100;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'promptfont';
|
|
src: url('https://redphx.github.io/better-xcloud/fonts/promptfont.otf');
|
|
}
|
|
|
|
/* Fix Stream menu buttons not hiding */
|
|
div[class^=HUDButton-module__hiddenContainer] ~ div:not([class^=HUDButton-module__hiddenContainer]) {
|
|
opacity: 0;
|
|
pointer-events: none !important;
|
|
position: absolute;
|
|
top: -9999px;
|
|
left: -9999px;
|
|
}
|
|
|
|
/* Remove the "Cloud Gaming" text in header when the screen is too small */
|
|
@media screen and (max-width: 640px) {
|
|
header a[href="/play"] {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.bx-full-width {
|
|
width: 100% !important;
|
|
}
|
|
|
|
.bx-full-height {
|
|
height: 100% !important;
|
|
}
|
|
|
|
.bx-no-scroll {
|
|
overflow: hidden !important;
|
|
}
|
|
|
|
.bx-hide-scroll-bar {
|
|
scrollbar-width: none;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.bx-gone {
|
|
display: none !important;
|
|
}
|
|
|
|
.bx-offscreen {
|
|
position: absolute !important;
|
|
top: -9999px !important;
|
|
left: -9999px !important;
|
|
visibility: hidden !important;
|
|
}
|
|
|
|
.bx-hidden {
|
|
visibility: hidden !important;
|
|
}
|
|
|
|
.bx-invisible {
|
|
opacity: 0;
|
|
}
|
|
|
|
.bx-unclickable {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.bx-pixel {
|
|
width: 1px !important;
|
|
height: 1px !important;
|
|
}
|
|
|
|
.bx-no-margin {
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.bx-no-padding {
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.bx-prompt {
|
|
font-family: var(--bx-promptfont-font) !important;
|
|
}
|
|
|
|
.bx-line-through {
|
|
text-decoration: line-through !important;
|
|
}
|
|
|
|
.bx-normal-case {
|
|
text-transform: none !important;
|
|
}
|
|
|
|
.bx-normal-link {
|
|
text-transform: none !important;
|
|
text-align: left !important;
|
|
font-weight: 400 !important;
|
|
font-family: var(--bx-normal-font) !important;
|
|
}
|
|
|
|
select[multiple], select[multiple]:focus {
|
|
overflow: auto;
|
|
|
|
option {
|
|
padding: 4px;
|
|
|
|
&:checked, {
|
|
color = var(--bx-primary-button-color);
|
|
background: color linear-gradient(0deg, color 0%, color 100%);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Hide UI elements */
|
|
#headerArea, #uhfSkipToMain, .uhf-footer {
|
|
display: none;
|
|
}
|
|
|
|
div[class*=NotFocusedDialog] {
|
|
position: absolute !important;
|
|
top: -9999px !important;
|
|
left: -9999px !important;
|
|
width: 0px !important;
|
|
height: 0px !important;
|
|
}
|
|
|
|
#game-stream video:not([src]) {
|
|
visibility: hidden;
|
|
}
|
|
|
|
/* Hide Controller icon in Game tiles */
|
|
div[class*=SupportedInputsBadge] {
|
|
&:not(:has(:nth-child(2))), svg:first-of-type {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
|
|
.bx-game-tile-wait-time {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 1;
|
|
background: #0000008c;
|
|
display: flex;
|
|
border-radius: 4px 0 4px 0;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
|
|
svg {
|
|
width: 14px;
|
|
height: 16px;
|
|
margin-right: 2px;
|
|
}
|
|
|
|
span {
|
|
display: inline-block;
|
|
height: 16px;
|
|
line-height: 16px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
margin-left: 2px;
|
|
}
|
|
}
|
|
|
|
|
|
.bx-fullscreen-text {
|
|
position: fixed;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background: #000000cc;
|
|
z-index: var(--bx-fullscreen-text-z-index);
|
|
line-height: 100vh;
|
|
color: #fff;
|
|
text-align: center;
|
|
font-weight: 400;
|
|
font-family: var(--bx-normal-font);
|
|
font-size: 1.3rem;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
/* Device Code page */
|
|
#root {
|
|
section[class*=DeviceCodePage-module__page] {
|
|
margin-left: 20px !important;
|
|
margin-right: 20px !important;
|
|
margin-top: 20px !important;
|
|
max-width: 800px !important;
|
|
}
|
|
|
|
div[class*=DeviceCodePage-module__back] {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.bx-blink-me {
|
|
animation: bx-blinker 1s linear infinite;
|
|
}
|
|
|
|
@keyframes bx-blinker {
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|