Files
brk/app-html/styles.css
2024-08-26 01:23:48 +02:00

716 lines
12 KiB
CSS

/*
* Variables
*/
:root {
--default-font-family: "Satoshi";
--default-font-feature-settings: "normal";
--default-font-variation-settings: "normal";
--white: #ffffe3;
--black: #10100e;
--lighter-gray: #e8e8e8;
--light-gray: #c0c0ab;
--dark-gray: #666660;
--darker-gray: #30302b;
--orange: #f97315;
--background-color: var(--white);
--color: var(--black);
--off-color: var(--light-gray);
--border-color: var(--lighter-gray);
--font-size-2xs: 0.625rem; /* 10px */
--line-height-2xs: 1rem; /* 16px */
--font-size-xs: 0.75rem; /* 12px */
--line-height-xs: 1rem; /* 16px */
--font-size-sm: 0.875rem; /* 14px */
--line-height-sm: 1.25rem; /* 20px */
--font-size-base: 1rem /* 16px */;
--line-height-base: 1.5rem /* 24px */;
--font-size-lg: 1.125rem /* 18px */;
--line-height-lg: 1.75rem /* 28px */;
--font-weight-medium: 500;
}
/* https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8 */
/* https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#link */
[data-theme="dark"] {
--background-color: var(--black);
--color: var(--white);
--off-color: var(--dark-gray);
--border-color: var(--darker-gray);
}
/*
* ---
* Base Tailwind
* ---
*/
*,
::after,
::before,
::backdrop,
::file-selector-button {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0 solid;
}
html,
:host {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
tab-size: 4;
font-family: var(--default-font-family), ui-sans-serif, system-ui, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-feature-settings: var(--default-font-feature-settings, normal);
font-variation-settings: var(--default-font-variation-settings, normal);
-webkit-tap-highlight-color: transparent;
}
body {
line-height: inherit;
}
hr {
height: 0;
color: inherit;
border-top-width: 1px;
}
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
a {
color: inherit;
-webkit-text-decoration: inherit;
text-decoration: inherit;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family: var(
--default-mono-font-family,
ui-monospace,
SFMono-Regular,
Menlo,
Monaco,
Consolas,
"Liberation Mono",
"Courier New",
monospace
);
font-feature-settings: var(--default-mono-font-feature-settings, normal);
font-variation-settings: var(--default-mono-font-variation-settings, normal);
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
table {
text-indent: 0;
border-color: inherit;
border-collapse: collapse;
}
button,
input,
optgroup,
select,
textarea,
::file-selector-button {
font: inherit;
font-feature-settings: inherit;
font-variation-settings: inherit;
letter-spacing: inherit;
color: inherit;
background: transparent;
}
input:where(:not([type="button"], [type="reset"], [type="submit"])),
select,
textarea {
border: 1px solid;
}
button,
input:where([type="button"], [type="reset"], [type="submit"]),
::file-selector-button {
appearance: button;
}
:-moz-focusring {
outline: auto;
}
:-moz-ui-invalid {
box-shadow: none;
}
progress {
vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
summary {
display: list-item;
}
ol,
ul,
menu {
list-style: none;
}
textarea {
resize: vertical;
}
::placeholder {
opacity: 1;
color: color-mix(in srgb, currentColor 50%, transparent);
}
:disabled {
cursor: default;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
vertical-align: middle;
}
img,
video {
max-width: 100%;
height: auto;
}
[hidden] {
display: none !important;
}
/*
* ---
* Custom
* ---
*/
/**
* @license
*
* Font Family: Satoshi
* Designed by: Deni Anggara
* URL: https://www.fontshare.com/fonts/satoshi
* © 2024 Indian Type Foundry
*
* This is a variable font
* You can control variable axes as shown below:
* font-variation-settings: wght 900.0;
*
* available axes: 'wght' (range from 300.0 to 900.0)
*/
@font-face {
font-family: "Satoshi";
src: url("./fonts/Satoshi.var.woff2") format("woff2");
font-weight: 100 900;
font-display: block;
font-style: normal;
}
@font-face {
font-family: "Satoshi Chart";
src: url("./fonts/Satoshi.var.woff2") format("woff2");
font-weight: 600 900;
font-display: block;
font-style: normal;
}
html {
background-color: var(--background-color);
color: var(--color);
scrollbar-color: var(--off-color) var(--background-color); /* Foreground, Background */
scrollbar-width: thin;
}
body {
font-size: var(--font-size-sm);
line-height: var(--line-height-sm);
}
a:hover {
color: var(--color);
}
button {
cursor: pointer;
background-color: var(--background-color);
}
hr {
width: 100%;
}
::marker {
color: var(--border-color);
}
button:hover,
button:hover .off,
nav > fieldset > label:hover,
summary:hover,
li:hover > label > span,
summary:hover::marker,
strong,
mark {
color: var(--orange);
}
* {
border-color: var(--border-color) !important;
border-style: solid !important;
}
*::selection {
color: var(--white);
background-color: var(--orange);
}
a {
display: inline-flex;
color: var(--color);
}
a:hover {
text-decoration-color: var(--orange);
text-decoration-line: underline;
text-decoration-style: wavy;
}
a:active,
button:active,
nav > fieldset > label:active {
transform: scaleX(0.95) scaleY(0.9);
}
nav > button,
nav > a,
p > a:has(svg),
nav > fieldset > label {
padding: 1rem;
}
svg {
width: 20px;
height: 20px;
color: var(--off-color);
fill: currentColor;
}
a:hover > svg,
button:hover > svg,
nav > fieldset > label:hover > svg,
label:has(input:checked) > svg {
color: currentColor;
}
button:disabled {
color: var(--off-color);
}
mark {
background-color: transparent;
padding: 0;
}
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
section {
flex: 1 1 0%;
overflow-x: hidden;
overflow-y: auto;
padding: 1.5rem /* 24px */;
height: 100%;
}
section:not(#selected-frame) {
padding-bottom: 21vh;
}
section > * + * {
margin-top: 1.5rem; /* 24px */
}
fieldset label {
position: relative;
}
fieldset label span.absolute {
text-align: center;
position: absolute;
bottom: 0;
margin-bottom: -0.5rem;
font-size: var(--font-size-2xs);
line-height: var(--line-height-2xs);
overflow: visible;
left: 0;
right: 0;
color: var(--off-color);
}
@media (min-width: 768px) {
.md\:hidden {
display: none !important;
}
}
input {
border: 0;
width: 100%;
}
input:focus-visible {
outline: none;
}
input::placeholder {
color: var(--off-color);
}
.sr-only,
input[type="radio"] {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
h1,
h2,
h3 {
font-weight: 700;
font-size: var(--font-size-lg);
line-height: var(--line-height-lg);
}
h4 {
font-size: var(--font-size-base);
line-height: var(--line-height-base);
font-weight: 500;
}
@media (min-width: 768px) {
h1,
h2,
h3 {
font-size: 1.25rem /* 20px */;
}
}
p {
margin-top: 1rem;
}
section > header {
display: flex;
padding-top: 0.25rem /* 4px */;
white-space: nowrap;
overflow-x: auto;
padding-bottom: 1.5rem;
margin-bottom: -1.5rem;
padding-left: 1.5rem;
margin-left: -1.5rem;
padding-right: 1.5rem;
margin-right: -1.5rem;
}
header > div {
flex: 1 1 0%;
}
section > header small {
font-size: var(--font-size-base);
line-height: var(--line-height-base);
}
section:not(#settings-frame) > footer {
position: absolute;
bottom: 0;
right: 0;
display: flex;
padding: 1.5rem /* 24px */;
z-index: 10;
}
section:not(#settings-frame) > footer > * + * {
margin-left: 1rem /* 16px */;
}
section:not(#settings-frame) > footer > button {
box-shadow: 0 0 1rem 0.5rem var(--background-color);
border-radius: 9999px;
border-width: 1px;
padding: 0.75rem /* 12px */;
}
.field {
display: flex;
align-items: center;
font-size: var(--font-size-sm);
line-height: var(--line-height-sm);
}
.field > * + * {
margin-left: 1.5rem;
}
.field > div > * + * {
margin-left: 1rem !important;
}
.field label {
padding: 0.5rem;
margin: -0.5rem;
}
.field > div {
display: flex;
}
.tree {
font-weight: var(--font-weight-medium);
font-size: var(--font-size-sm);
line-height: var(--line-height-sm);
}
summary {
list-style: none;
display: flex;
align-items: center;
cursor: pointer;
}
label:has(input[type="radio"]) {
cursor: pointer;
display: flex;
flex-direction: column;
user-select: none;
font-weight: var(--font-weight-medium);
color: var(--off-color);
}
label:has(input[type="radio"]:checked) {
color: var(--color);
}
label:has(input[type="radio"]) > span.main {
display: flex;
align-items: center;
}
label:has(input[type="radio"]) > *:not(input[type="radio"]) {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
label:has(input[type="radio"]) > *:not(input[type="radio"]) + * {
margin-top: -0.5rem /* -8px */;
}
label:has(input[type="radio"]) .emoji {
line-height: 0.9;
filter: grayscale(100%) brightness(60%) contrast(150%);
font-size: 1.0625rem;
}
label:has(input[type="radio"]:checked) .emoji,
label:has(input[type="radio"]):hover .emoji {
filter: sepia(90%) saturate(420%) hue-rotate(320deg) brightness(80%);
}
.tree label:has(input[type="radio"]),
.list label:has(input[type="radio"]) {
color: var(--color);
}
label:has(input[type="radio"]):hover,
label:has(input[type="radio"]):hover *,
.tree label:has(input[type="radio"]:checked),
.tree label:has(input[type="radio"]:checked) *,
.list label:has(input[type="radio"]:checked),
.list label:has(input[type="radio"]:checked) * {
color: var(--orange) !important;
}
summary:hover * {
color: var(--orange) !important;
}
summary::marker,
summary::-webkit-details-marker {
display: none;
}
span.name {
margin: 0.375rem /* 6px */;
flex: 1 1 0%;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree .marker {
color: var(--border-color);
font-size: var(--font-size-xs);
line-height: var(--line-height-xs);
z-index: 10;
margin-left: -5px;
margin-bottom: 0.0625rem;
}
.main .new {
width: 0.375rem /* 6px */;
height: 0.375rem /* 6px */;
border-radius: 9999px;
background-color: var(--orange);
}
.tree li {
display: block;
position: relative;
padding-left: 12px;
border-left: 1px;
}
.tree li:last-child {
border-color: transparent !important;
}
.tree li::before {
content: "";
display: block;
position: absolute;
top: -12px;
left: -1px;
width: 9px;
height: 1.75rem;
border-color: var(--border-color);
border-width: 0 0 1px 1px;
border-radius: 0px 0px 0px 4px;
}
.tree summary > small {
margin-top: 0.125rem;
}
.list > * + * {
margin-top: 0.25rem;
}
/*
* History heading
*/
:root {
--history-heading-margin: calc(-1.5rem - 1px);
}
.list h4 {
position: sticky;
top: var(--history-heading-margin);
z-index: 10;
background-color: var(--background-color);
padding: 1rem;
padding-left: 0;
border-top-width: 1px;
border-bottom-width: 1px;
margin-bottom: 1rem;
margin-top: 2rem;
}
.list h4:first-child {
margin-top: var(--history-heading-margin);
}
small {
color: var(--off-color);
font-size: var(--font-size-xs);
line-height: var(--line-height-xs);
}
#leaderboard {
margin-top: 1rem;
color: var(--off-color);
margin-left: 1.375rem;
list-style-type: decimal;
font-size: var(--font-size-xs);
line-height: var(--line-height-xs);
}
#leaderboard ::marker {
color: var(--off-color);
}
#leaderboard a {
font-size: var(--font-size-sm);
line-height: var(--line-height-sm);
}
#leaderboard span {
color: var(--orange);
}