Skip to content

Instantly share code, notes, and snippets.

@exelotl
Last active June 4, 2023 21:09
Show Gist options
  • Save exelotl/b6b1592a910ae7914e48fda14c593cd3 to your computer and use it in GitHub Desktop.
Save exelotl/b6b1592a910ae7914e48fda14c593cd3 to your computer and use it in GitHub Desktop.
Dark theme for the Tonc GBA tutorial
/* ==UserStyle==
@name Tonc Dark
@namespace exelo.tl
@version 1.0.4
@description A dark theme for the Tonc GBA tutorial, based on Water.css
@updateURL https://gist.githubusercontent.com/exelotl/b6b1592a910ae7914e48fda14c593cd3/raw/tonc-dark.user.css
@author exelotl
==/UserStyle== */
@-moz-document url-prefix("https://www.coranac.com/tonc/text/"), url-prefix("https://coranac.com/tonc/text/"), url-prefix("http://www.coranac.com/tonc/text/"), url-prefix("http://coranac.com/tonc/text/") {
:root {
--background-body: #202b38;
--background: #161f27;
--background-alt: #1a242f;
--selection: #161f27;
--text-main: #dbdbdb;
--text-bright: #ffffff;
--text-muted: #717880;
--links: #41adff;
--focus: #0096bfab;
--border: #dbdbdb;
--code: #ffbe85;
--animation-duration: 0.1s;
--button-hover: #324759;
--scrollbar-thumb: var(--button-hover);
--scrollbar-thumb-hover: rgb(65, 92, 115);
--form-placeholder: #a9a9a9;
--form-text: #ffffff;
--variable: #d941e2;
--highlight: #efdb43;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
margin: 20px auto;
padding: 0 10px;
color: var(--text-main);
background: var(--background-body);
}
button,
input,
textarea {
transition: background-color var(--animation-duration) linear,
border-color var(--animation-duration) linear,
color var(--animation-duration) linear,
box-shadow var(--animation-duration) linear,
transform var(--animation-duration) ease;
}
h1 {
font-size: 2.2em;
margin-top: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: 12px;
}
h1,
h2,
h3,
h4,
h5,
h6,
strong {
color: var(--text-bright);
}
h1,
h2,
h3,
h4,
h5,
h6,
b,
strong,
th {
font-weight: 600;
}
q:before {
content: none;
}
q:after {
content: none;
}
blockquote,
q {
border-left: 4px solid var(--focus);
margin: 1.5em 0em;
padding: 0.5em 1em;
font-style: italic;
}
blockquote > footer {
font-style: normal;
border: 0;
}
blockquote cite {
font-style: normal;
}
mark {
background-color: var(--highlight);
border-radius: 2px;
padding: 0px 2px 0px 2px;
color: #000000;
}
fieldset {
border: 1px var(--focus) solid;
border-radius: 6px;
margin: 0;
margin-bottom: 6px;
padding: 10px;
}
legend {
font-size: 0.9em;
font-weight: 600;
}
a {
text-decoration: none;
color: var(--links);
}
a:hover {
text-decoration: underline;
}
code,
samp,
time {
background: var(--background);
color: var(--code);
padding: 2.5px 5px;
border-radius: 6px;
font-size: 0.9em;
}
pre > code {
padding: 10px;
display: block;
overflow-x: auto;
}
var {
color: var(--variable);
font-style: normal;
font-family: monospace;
}
img {
max-width: 100%;
height: auto;
}
hr {
border: none;
border-top: 1px solid var(--border);
}
table {
border-collapse: collapse;
margin-bottom: 10px;
/* width: 100%; */
}
td,
th {
padding: 6px;
text-align: left;
}
thead {
border-bottom: 1px solid var(--border);
}
tfoot {
border-top: 1px solid var(--border);
}
tbody tr:nth-child(odd), tbody tr.bg1 td {
background-color: var(--background-body);
}
tbody tr:nth-child(even), tbody tr.bg0 td {
background-color: var(--background-alt);
}
::-webkit-scrollbar {
height: 10px;
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--background);
border-radius: 6px;
}
::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-hover);
}
details {
display: flex;
flex-direction: column;
align-items: flex-start;
background-color: var(--background-alt);
padding: 10px 10px 0;
margin: 1em 0;
border-radius: 6px;
overflow: hidden;
}
details[open] {
padding: 10px;
}
details > :last-child {
margin-bottom: 0;
}
details[open] summary {
margin-bottom: 10px;
}
summary {
display: list-item;
background-color: var(--background);
padding: 10px;
margin: -10px -10px 0;
}
details > :not(summary) {
margin-top: 0;
}
summary::-webkit-details-marker {
color: var(--text-main);
}
footer {
border-top: 1px solid var(--background);
padding-top: 10px;
font-size: 0.8em;
color: var(--text-muted);
}
/* Equation Table */
table.eqtbl {
border-collapse: separate;
}
table.eqtbl tr td, table.eqtbl tr th, .eqcell td {
background-color: var(--background-body);
text-align: center;
padding: 3px;
margin: 0;
}
.cblock td, .cblock th {
text-align: center;
}
.bdrB, .bdrBL, .bdrBR, .bdrLL, .bdrRR {
border-bottom: 1px var(--text-main) solid;
}
.bdrL, .bdrTL, .bdrBL, .bdrLL {
border-left: 1px var(--text-main) solid;
}
.bdrT, .bdrTL, .bdrTR, .bdrLL, .bdrRR {
border-top: 1px var(--text-main) solid;
}
.bdrR, .bdrTR, .bdrBR, .bdrRR {
border-right: 1px var(--text-main) solid;
}
/* Image with caption */
td .cpt, div.cpt, div.cpt_fr {
background: var(--background-alt);
/* border: 1px solid var(--border); */
border: none;
border-radius: 2px;
color: var(--text-main);
padding: 2px 4px 2px 4px;
}
div.cpt_fr[style="width:200px;"] {
width: 224px !important;
}
div.cpt_fr {
padding: 6px 6px 4px 6px;
}
div.cpt_fr td {
text-align: center
}
.lblock .cpt {
padding: 8px 12px 6px 12px;
}
td img, .cpt_fr img {
margin-bottom: 1px;
}
tt {
color: var(--code);
line-height: 0.7em;
}
div.note {
/* display: list-item; */
background-color: var(--background);
padding: 10px;
border: none;
box-shadow: none;
border-radius: 0;
/* margin: -10px -10px 0; */
}
div.nhbad, span.rem, .ack {
color: #ec1256;
}
div.nhgood {
color: #1ec36d;
}
div.nhcare {
color: #e88f42;
}
pre.proglist {
background-color: var(--background);
border: none;
box-shadow: none;
color: var(--text-main);
}
pre span.keyw {
color: #e784a2;
}
pre span.cmt {
color: #748187;
}
pre span.str {
color: #66DD88;
}
pre span.num {
color: #57b5d4;
}
pre span.rem {
color: #ec1256;
text-decoration: underline;
text-decoration-style: wavy;
}
font[color="blue"] {
color: #43a8e6;
}
font[color="green"] {
color: #45e774;
}
font[color="red"] {
color: #ef0d4b;
}
li {
margin: 4px 0 4px 0;
}
em {
color: var(--highlight);
font-weight: 600;
}
table, tbody, tr, th, td, tr.bg0, tr.bg1 {
border: none;
}
tr.bg1 td, tr.bg0 td {
border:none;
}
/* Register/bitfield table */
table.reg {
border: none;
border-collapse: separate;
border-spacing: 2px;
background: var(--background-body);
}
table.reg * {
border-color: var(--background-body);
}
/* Bitfield flag offsets */
tr.bits td {
text-align: center;
}
/* Bitfield flag names */
tr.bf td {
text-align: center;
border-top: 1px solid;
}
tr.bf td:nth-last-child(even) {
background: var(--background-body);
}
/* Bitfield flag colors */
.rclr0 {
color: #ef0d4b;
}
.rclr1 {
color: #41adff;
}
.rclr2 {
color: #45e774;
}
.rclr3 {
color: #d948d9;
}
.rclr4 {
color: #f9663e;
}
.rclr5 {
color: #d09a4c;
}
.rclr6 {
color: #e7849b;
}
.rclr7 {
color: #dce24b;
}
.rof, .wof {
color: var(--text-main);
}
.keyw {
color: #fb7b43;
}
blockquote[style="background:#e0e0e0;"] {
background-color: var(--background-body) !important;
}
/* screenblock diagram in regbg.htm */
td[bgcolor="red"] {
color: #fff;
background-color: #fb224e;
}
td[bgcolor="green"] {
color: #fff;
background-color: #26c88e;
}
td[bgcolor="blue"] {
color: #fff;
background-color: #184d92;
}
td[bgcolor="gray"] {
color: #fff;
background-color: #606f79;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment