bitburner-src/css/styles.scss

661 lines
13 KiB
SCSS
Raw Normal View History

@import "mixins";
@import "theme";
@import "reset";
:root {
--my-font-color: #6f3;
--my-background-color: #000;
--my-highlight-color: #fff;
--my-prompt-color: #f92672;
2017-06-07 03:23:51 +02:00
}
2017-08-20 03:36:19 +02:00
2017-09-01 16:12:40 +02:00
body {
2017-06-07 03:23:51 +02:00
background-color: var(--my-background-color);
2016-10-16 01:23:04 +02:00
}
p,
pre,
h2,
.text {
2017-06-07 03:23:51 +02:00
color: var(--my-font-color);
2016-10-16 01:23:04 +02:00
}
h1 {
font-size: $defaultFontSize * 1.375;
2017-06-07 03:23:51 +02:00
color: var(--my-font-color);
}
2016-11-24 23:30:33 +01:00
ul {
padding: 2px;
list-style-type: none;
}
li {
list-style-type: none;
}
2017-04-24 17:35:10 +02:00
span {
margin: 4px;
padding: 4px;
}
button[type="button"] {
@include transform(translateX(-50%));
padding: 0.5rem 1rem;
position: absolute;
z-index: 1;
bottom: 10px;
left: 50%;
}
2017-09-01 16:12:40 +02:00
#entire-game-container {
background-color: transparent;
2017-09-01 16:12:40 +02:00
}
/* Disable border highlight on elements */
input:focus,
textarea:focus,
button:focus,
td:focus,
tr:focus {
outline: none;
}
2017-07-22 00:54:55 +02:00
/* Main navigation menu */
.mainmenu {
list-style-type: none;
margin: 0;
padding: 0;
width: 10%;
position: fixed;
height: 100%;
overflow: auto;
2017-08-20 03:36:19 +02:00
border: 0;
border-bottom: 1px solid #000;
border-radius: 0;
background-color: #333;
}
2017-07-22 00:54:55 +02:00
/* Default buttons */
.mainmenu > li a {
display: block;
color: #e6e6e6;
2017-07-22 00:54:55 +02:00
background-color: #555;
padding: 12px 8px;
2018-09-21 18:31:44 +02:00
text-decoration: none;
}
2018-09-21 18:31:44 +02:00
.mainmenu.classic > li a {
padding: 16px;
}
2017-07-22 00:54:55 +02:00
/* Hovering makes them lighter */
.mainmenu > li a:hover,
.mainmenu > li a:hover:not(.active),
.mainmenu > li a:focus {
2017-07-22 00:54:55 +02:00
background-color: #777;
color: #fff;
2016-10-16 01:23:04 +02:00
}
2017-07-22 00:54:55 +02:00
/* Panel headers can become active, and they are "lighter" than the rest */
.mainmenu > li a.active {
2017-07-22 00:54:55 +02:00
background-color: #777;
color: #fff;
2016-10-16 01:23:04 +02:00
}
.mainmenu > li a.active:hover {
background-color: #aaa;
2017-07-22 00:54:55 +02:00
}
#hacking-menu-header-li,
#character-menu-header-li,
#world-menu-header-li,
#help-menu-header-li {
position: relative;
}
/* Accordion Outline */
.mainmenu-accordion-header {
outline: 2px solid #fff;
}
2018-09-21 18:31:44 +02:00
.mainmenu-accordion-header-classic {
border: 2px solid #fff;
padding: 16px !important;
}
2017-07-22 00:54:55 +02:00
/* Plus and minus signs */
.mainmenu-accordion-header:after {
content: '\02795';
float: right;
font-size: $defaultFontSize * 0.8125;
position: absolute;
bottom: 25%;
right: 3px;
color: transparent;
text-shadow: 0 0 0 #fff;
2017-07-22 00:54:55 +02:00
}
2018-09-21 18:31:44 +02:00
.mainmenu-accordion-header-classic:after {
content: '\02795';
float: right;
font-size: $defaultFontSize * 0.8125;
color: #fff;
margin-left: 5px;
}
.mainmenu-accordion-header.opened,
.mainmenu-accordion-header-classic.opened {
background-color: #222;
&:after {
content: "\2796";
}
2017-07-22 00:54:55 +02:00
}
/* Slide down transition */
.mainmenu-accordion-panel {
max-height: 0;
opacity: 1;
transition: max-height 0.2s ease-out;
}
/* Make html links ("a" elements) nice looking buttons with this class */
a:link,
a:visited {
color: #fff;
}
.a-link-button {
text-decoration: none;
background-color: #555;
color: #fff;
padding: 3px 5px;
margin: 5px;
border: 1px solid #333;
-moz-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
&:hover {
background-color: #666;
}
&:active {
@include boxShadow(inset 0 1px 4px rgba(0, 0, 0, 0.6));
}
2017-09-26 04:44:33 +02:00
}
/* Make anchor tags ("a" elements) inactive (not clickable) */
.a-link-button-inactive {
text-decoration: none;
background-color: #333;
color: #fff;
padding: 3px 5px;
margin: 5px;
border: 1px solid #333;
cursor: default;
&:hover {
.tooltiptext,
.tooltiptexthigh,
.tooltiptextleft {
visibility: visible;
}
}
&:active {
pointer-events: none;
}
}
/* Make anchor tags ("a" elements) for activated actions */
.a-link-button-bought {
text-decoration: none;
background-color: #0a0;
color: #fff;
padding: 3px 5px;
margin: 5px;
border: 1px solid #0a0;
cursor: default;
&:hover {
.tooltiptext,
.tooltiptexthigh,
.tooltiptextleft {
visibility: visible;
}
}
&:active {
pointer-events: none;
}
}
.dropdown {
color: #fff;
background-color: #000;
}
.text-input {
color: #fff;
background-color: #000;
}
/* Notification icon (for create program right now only) */
2017-07-22 00:54:55 +02:00
#create-program-tab {
position: relative;
}
#create-program-notification {
font-size: $defaultFontSize * 0.625;
position: absolute; /* Position the badge within the relatively positioned button */
top: 0;
right: 0;
}
.notification-on {
background-color: #fa3e3e;
color: #fff;
border-radius: 2px;
padding: 1px 3px;
}
.notification-off {
background-color: #333;
color: #333;
border-radius: 0;
padding: 0;
}
/* Tool tips (when hovering over an element */
.tooltip {
display: inline-block;
position: relative;
2017-08-20 03:36:19 +02:00
.tooltiptext {
visibility: hidden;
width: 300px;
background-color: var(--my-background-color);
border: 2px solid var(--my-highlight-color);
color: #fff;
text-align: center;
padding: 4px;
left: 101%;
pointer-events: none;
position: absolute;
z-index: 99;
}
}
/* Same thing as a normal tooltip except its a bit higher */
.tooltip .tooltiptexthigh {
visibility: hidden;
width: 300px;
background-color: var(--my-background-color);
border: 2px solid var(--my-highlight-color);
color: #fff;
text-align: center;
padding: 4px;
left: 101%;
bottom: -25%;
position: absolute;
z-index: 99;
}
/* Similar to a normal tooltip except its positioned on the left of the element
rather than the right to avoid exceeding the elements normal width */
.tooltip .tooltiptextleft {
visibility: hidden;
width: 300px;
background-color: var(--my-background-color);
border: 2px solid var(--my-highlight-color);
color: #fff;
text-align: center;
padding: 4px;
left: 40%;
bottom: -10%;
position: absolute;
z-index: 99;
}
.tooltip:hover .tooltiptext,
.tooltip:hover .tooltiptexthigh,
.tooltip:hover .tooltiptextleft {
visibility: visible;
2017-05-15 07:09:14 +02:00
}
2018-03-12 20:39:04 +01:00
/* help tip. Question mark that opens popup with info/details */
.help-tip {
content: '?';
padding: 1px;
margin-left: 3px;
color: #fff;
border: 1px solid #fff;
border-radius: 5px;
display: inline-block;
2018-03-12 20:39:04 +01:00
}
.help-tip-big {
content: '?';
padding: 3px;
margin-left: 3px;
color: #fff;
border: 1px solid #fff;
border-radius: 8px;
display: inline-block;
}
.help-tip:hover,
.help-tip-big:hover {
2018-03-12 20:39:04 +01:00
background-color: #888;
}
.help-tip:active,
.help-tip-big:active {
2018-07-16 17:28:09 +02:00
@include boxShadow(inset 0 1px 4px rgba(0, 0, 0, 0.6));
2018-03-12 20:39:04 +01:00
}
/* Flashing button (Red) */
2017-05-15 07:09:14 +02:00
@-webkit-keyframes glowing {
0% { background-color: #b20000; -webkit-box-shadow: 0 0 3px #b20000; }
50% { background-color: #f00; -webkit-box-shadow: 0 0 40px #f00; }
100% { background-color: #b20000; -webkit-box-shadow: 0 0 3px #b20000; }
2017-05-15 07:09:14 +02:00
}
@-moz-keyframes glowing {
0% { background-color: #b20000; -moz-box-shadow: 0 0 3px #b20000; }
50% { background-color: #f00; -moz-box-shadow: 0 0 40px #f00; }
100% { background-color: #b20000; -moz-box-shadow: 0 0 3px #b20000; }
2017-05-15 07:09:14 +02:00
}
@-o-keyframes glowing {
0% { background-color: #b20000; box-shadow: 0 0 3px #b20000; }
50% { background-color: #f00; box-shadow: 0 0 40px #f00; }
100% { background-color: #b20000; box-shadow: 0 0 3px #b20000; }
2017-05-15 07:09:14 +02:00
}
@keyframes glowing {
0% { background-color: #b20000; box-shadow: 0 0 3px #b20000; }
50% { background-color: #f00; box-shadow: 0 0 40px #f00; }
100% { background-color: #b20000; box-shadow: 0 0 3px #b20000; }
2017-05-15 07:09:14 +02:00
}
.flashing-button {
-webkit-animation: glowing 1500ms infinite;
-moz-animation: glowing 1500ms infinite;
-o-animation: glowing 1500ms infinite;
animation: glowing 1500ms infinite;
}
/* Blinking Cursor */
/* ----- blinking cursor animation ----- */
.typed-cursor {
opacity: 1;
-webkit-animation: blink 0.95s infinite;
-moz-animation: blink 0.95s infinite;
-ms-animation: blink 0.95s infinite;
-o-animation: blink 0.95s infinite;
animation: blink 0.95s infinite;
}
@-keyframes blink{
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
@-webkit-keyframes blink{
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
@-moz-keyframes blink{
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
@-ms-keyframes blink{
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
@-o-keyframes blink{
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
/* Status text */
@-webkit-keyframes status-text {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.status-text {
display: inline-block;
height: 15%;
position: fixed;
z-index: 2;
-webkit-animation: status-text 3s 1;
}
#status-text-container {
background-color: transparent;
}
#status-text {
background-color: transparent;
font-size: $defaultFontSize * 1.25;
bottom: 0;
color: #fff;
margin-right: 14px;
padding: 4px;
right: 0;
top: 0;
width: auto;
}
2017-05-20 09:33:33 +02:00
/* Character Overview */
#character-overview-wrapper {
position: relative;
}
2017-05-20 09:33:33 +02:00
#character-overview-container {
display: none;
position: absolute; /* Stay in place */
2017-05-20 09:33:33 +02:00
right: 0;
top: 0;
2018-08-03 16:54:13 +02:00
height: auto; /* Full height */
padding: 10px 2px;
2017-06-07 03:23:51 +02:00
border: 2px solid var(--my-highlight-color);
width: auto;
max-width: 280px;
2017-05-20 09:33:33 +02:00
overflow: auto; /* Enable scroll if needed */
background-color: rgba(57, 54, 54, 0.9); /* Fallback color */
2017-05-20 09:33:33 +02:00
z-index: 1;
}
#character-overview-text {
color: $my-stat-physical;
table {
border-collapse: collapse;
margin: auto;
}
td {
padding: 2px;
vertical-align: middle;
}
2017-05-20 09:33:33 +02:00
}
2018-08-03 16:54:13 +02:00
.character-stat-text {
color: #fff;
background-color: #444;
}
.character-stat-cell {
2018-08-03 16:54:13 +02:00
text-align: right;
}
#character-hack-wrapper td,
#character-agi-wrapper td {
border-bottom: 1px #aaa solid;
padding-bottom: 10px;
}
#character-str-wrapper td,
#character-cha-wrapper td {
padding-top: 10px;
}
#character-hp-wrapper { color: $my-stat-hp-color; }
#character-money-wrapper { color: $my-stat-money-color; }
#character-hack-wrapper { color: $my-stat-hack-color; }
#character-cha-wrapper { color: $my-stat-cha-color; }
#character-int-wrapper { color: $my-stat-int-color; }
#character-overview-save-button,
#character-overview-options-button {
@include borderRadius(12px);
2018-07-16 17:28:09 +02:00
@include boxShadow(1px 1px 3px #000);
color: #cecece;
display: inline-block;
font-size: $defaultFontSize * 0.875;
font-weight: bold;
height: 25px;
background-color: #000;
padding: 5px 8px;
}
2018-08-03 16:54:13 +02:00
.character-quick-options {
margin-top: 10px;
text-align: center;
2018-08-03 16:54:13 +02:00
}
#character-overview-save-button:hover,
#character-overview-save-button:focus,
#character-overview-options-button:hover,
#character-overview-options-button:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}
/* Scan analyze links from AutoLink */
.scan-analyze-link {
cursor: pointer;
color: #fff;
text-decoration: underline;
&:hover {
text-decoration: none;
}
}
/* Accordion menus (Header with collapsible panel) */
.accordion-header {
background-color: #444;
font-size: $defaultFontSize * 1.25;
color: #fff;
margin: 6px 6px 0 6px;
padding: 4px 6px;
cursor: pointer;
width: 80%;
text-align: left;
border: none;
outline: none;
position: relative;
&.active,
&:hover {
background-color: #555;
}
&.active:hover {
background-color: #666;
}
&:after {
content: '\02795'; /* "plus" sign (+) */
font-size: $defaultFontSize * 0.8125;
float: right;
color: transparent;
text-shadow: 0 0 0 #fff;
position: absolute;
bottom: 5px;
right: 6px;
}
&.active:after {
content: "\2796"; /* "minus" sign (-) */
}
}
.accordion-panel {
margin: 0 6px 6px 6px;
padding: 0 6px 6px 6px;
width: 75%;
margin-left: 5%;
display: none;
background-color: #555;
overflow-y: auto;
overflow-x: none;
div, ul, p, ul > li {
background-color: #555;
}
}
/* override the global <span> styling */
#active-scripts-total-production-active,
#active-scripts-total-prod-aug-total,
#active-scripts-total-prod-aug-avg {
margin: 0;
padding: 0;
}
/* Helper Classes */
.hacker-green {
color: $hacker-green;
}
.money-gold {
color: $money-gold;
}
.light-yellow {
color: $light-yellow;
}
.failure {
color: $alert-red;
text-shadow: 0 0 0 $alert-red;
}
.success {
color: $success-green;
text-shadow: 0 0 0 $success-green;
}
.physical-yellow {
color: $my-stat-physical;
}
.charisma-purple {
color: $my-stat-cha-color;
}