Files
Bubberstation/html/statbrowser.css
Aylong 56eadcb0df Refactor Stat Panel styles and more TGUI-like appearance (#85257)
## About The Pull Request
The PR came out a little bigger than I had planned, but creating
separate ones for a couple of little things seemed unnecessary to me.

Let me start with the most important thing: Stat Panel now scales like
TGchat and also looks closer to TGUI!
By default, the Stat Panel font size is tied to the chat font size, but
this can be changed in a couple of clicks...

The rest of the changes are not as big:
1. Stat Panel styles are now more organised
2. The way themes are applied to Byond Skin has been refactored, if
someone decides to make a new theme (maybe me), it won't be necessary to
copy all the elements
3. NumberInput into the general chat settings tab, was changed to slider
4. Reoder tab buttons changed, they are more compact now
5. With the light theme, chat tabs now have a background when
hovering/active tabbing
<details>
<summary>How it look's like</summary>

| New reorder tab buttons | Light Chat tabs | 
| - | - | 
|
![image](https://github.com/user-attachments/assets/39194331-b69f-473f-ba82-497a86bbe062)
|
![image](https://github.com/user-attachments/assets/6fe22bac-2802-4e03-8095-0633b06a5b03)
|

</details>
<details>
<summary>General Preview</summary>


https://github.com/user-attachments/assets/7647d584-c2fd-41b2-b2ee-c7ee61569d1f

</details>

## Why It's Good For The Game
More accessibility for owners of 2/4k monitors
Better appearance
NumberInput is behaving extremely strangely in chat

## Changelog

🆑
add: Stat Panel now scales like a chat, depends on the font size.
Defaults from the chat font size, but you can separate it.
refactor: Refactored Stat Panel styles and Byond skin theme applying.
Stat Panel now looks more like a TGUI
/🆑
2024-07-29 11:55:22 -07:00

213 lines
3.2 KiB
CSS

body {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 12px;
margin: 0 !important;
padding: 0 !important;
overflow: hidden;
}
a {
color: #003399;
text-decoration: none;
}
a:hover {
color: #007fff;
}
h3 {
margin: 0 -0.5em 0.25em;
padding: 1em 0.66em 0.5em;
border-bottom: 0.1667em solid;
}
img {
-ms-interpolation-mode: nearest-neighbor;
image-rendering: pixelated;
}
.stat-container {
display: flex;
flex-direction: column;
height: 100vh;
}
#menu {
display: flex;
overflow-x: auto;
overflow-y: hidden;
padding: 0.25em 0.25em 0;
background-color: #ffffff;
}
.button {
display: inline-table;
cursor: pointer;
user-select: none;
-ms-user-select: none; /* Remove after Byond 516 */
text-align: center;
font-size: 1em;
min-width: 2.9em;
padding: 0.5em 0.5em 0.4em;
background-color: transparent;
color: rgba(0, 0, 0, 0.5);
border: 0;
border-bottom: 0.1667em solid transparent;
border-radius: 0.25em 0.25em 0 0;
}
.button:hover {
background-color: #ececec;
}
.button.active {
background-color: #dfdfdf;
color: black;
border-bottom-color: #000000;
}
#under-menu {
height: 0.5em;
background-color: #eeeeee;
}
#statcontent {
flex: 1;
padding: 0.75em 0.5em;
overflow-y: scroll;
overflow-x: hidden;
}
.grid-container {
margin: 0;
}
.grid-item {
display: inline-flex;
position: relative;
user-select: none;
-ms-user-select: none; /* Remove after Byond 516 */
width: 100%;
box-sizing: border-box;
text-decoration: none;
background-color: transparent;
color: black;
}
.grid-item:hover {
color: #003399;
z-index: 1;
}
.grid-item-text {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
box-sizing: border-box;
white-space: nowrap;
width: 100%;
padding: 0.33em 0.5em;
border-radius: 0.25em;
}
.grid-item-text:hover {
position: absolute;
top: -1.33em;
white-space: normal;
background-color: #ececec;
}
.grid-item-text:active {
background-color: #dfdfdf;
}
@media only screen and (min-width: 300px) {
.grid-item {
width: 50%;
}
}
@media only screen and (min-width: 430px) {
.grid-item {
width: 33%;
}
}
@media only screen and (min-width: 560px) {
.grid-item {
width: 25%;
}
}
@media only screen and (min-width: 770px) {
.grid-item {
width: 20%;
}
}
.status-info {
margin: 0 0.33em 0.25em;
}
.interview_panel_stats,
.interview_panel_controls {
margin-bottom: 1em;
}
/* Dark theme colors */
body.dark {
background-color: #131313;
color: #b2c4dd;
scrollbar-base-color: #1c1c1c;
scrollbar-face-color: #3b3b3b;
scrollbar-3dlight-color: #252525;
scrollbar-highlight-color: #252525;
scrollbar-track-color: #1c1c1c;
scrollbar-arrow-color: #929292;
scrollbar-shadow-color: #3b3b3b;
}
.dark a {
color: #6699ff;
}
.dark a:hover,
.dark .grid-item:hover {
color: #80bfff;
}
.dark #menu {
background-color: #131313;
}
.dark .button {
color: rgba(255, 255, 255, 0.5);
}
.dark .button:hover {
background-color: #252525;
}
.dark .button.active {
background-color: #313131;
color: #d4dfec;
border-bottom-color: #d4dfec;
}
.dark #under-menu {
background-color: #202020;
}
.dark .grid-item{
color: #b2c4dd;
}
.dark .grid-item-text:hover {
background-color: #252525;
}
.dark .grid-item-text:active {
background-color: #313131;
}