aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-06 00:02:39 -0800
committerFuwn <[email protected]>2024-01-06 00:02:39 -0800
commit5377f4d2c7c9d8f38bb9a9595bc9774aaa1bc2f4 (patch)
treead9313d333252fcc105c6a5dca97cf24741eadb4 /src/lib
parentfeat(css): smaller body shadow (diff)
downloaddue.moe-5377f4d2c7c9d8f38bb9a9595bc9774aaa1bc2f4.tar.xz
due.moe-5377f4d2c7c9d8f38bb9a9595bc9774aaa1bc2f4.zip
refactor(css): move to modules
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Styles/badge.css16
-rw-r--r--src/lib/Styles/card.css38
-rw-r--r--src/lib/Styles/colours.css43
-rw-r--r--src/lib/Styles/details.css20
-rw-r--r--src/lib/Styles/features.css7
-rw-r--r--src/lib/Styles/input.css132
-rw-r--r--src/lib/Styles/normalise.css23
-rw-r--r--src/lib/Styles/typography.css21
8 files changed, 300 insertions, 0 deletions
diff --git a/src/lib/Styles/badge.css b/src/lib/Styles/badge.css
new file mode 100644
index 00000000..0cd710c9
--- /dev/null
+++ b/src/lib/Styles/badge.css
@@ -0,0 +1,16 @@
+.button-badge:hover {
+ background-color: var(--base0C);
+ cursor: unset;
+}
+
+.button-badge:active {
+ transform: scale(0.75);
+}
+
+.badge-info {
+ background-color: var(--base0B);
+}
+
+.badge-info:hover {
+ background-color: var(--base0B);
+}
diff --git a/src/lib/Styles/card.css b/src/lib/Styles/card.css
new file mode 100644
index 00000000..6219aa8a
--- /dev/null
+++ b/src/lib/Styles/card.css
@@ -0,0 +1,38 @@
+@import './details.css';
+
+details,
+.card {
+ box-shadow: 0 2.5px 10px var(--base01), 0 0 0 3px var(--base02), 0 4px 30px var(--base01);
+}
+
+#header {
+ box-shadow: 0 2.5px 10px var(--base01), 0 0 0 5px var(--base02), 0 4px 30px var(--base01);
+}
+
+.card {
+ background-color: var(--base0011);
+ padding: 1rem;
+ border-radius: 8px;
+ backdrop-filter: blur(4px);
+ -webkit-backdrop-filter: blur(4px);
+}
+
+.card details,
+.no-shadow {
+ box-shadow: none;
+}
+
+.card-small {
+ padding: 0.5rem;
+}
+
+.card-clear {
+ background-color: transparent;
+}
+
+.card-centered {
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
diff --git a/src/lib/Styles/colours.css b/src/lib/Styles/colours.css
new file mode 100644
index 00000000..43030e1c
--- /dev/null
+++ b/src/lib/Styles/colours.css
@@ -0,0 +1,43 @@
+:root {
+ --base00: #f8f8f8;
+ --base001: #ffffff;
+ --base0011: #ffffff80;
+ --base01: #e8e8e8;
+ --base02: #d8d8d8;
+ --base03: #b8b8b8;
+ --base04: #585858;
+ --base05: #383838;
+ --base06: #282828;
+ --base07: #181818;
+ --base08: #ab4642;
+ --base09: #dc9656;
+ --base0A: #f7ca88;
+ --base0B: #a1b56c;
+ --base0C: #86c1b9;
+ --base0D: #7cafc2;
+ --base0E: #ba8baf;
+ --base0F: #a16946;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --base00: #080808;
+ --base001: #0c0c0c;
+ --base0011: #0c0c0c80;
+ --base01: #181818;
+ --base02: #282828;
+ --base03: #484848;
+ --base04: #a8a8a8;
+ --base05: #c8c8c8;
+ --base06: #d8d8d8;
+ --base07: #f8f8f8;
+ --base08: #9a4541;
+ --base09: #cb9555;
+ --base0A: #f6c987;
+ --base0B: #a0b45b;
+ --base0C: #85c0b8;
+ --base0D: #7baeb1;
+ --base0E: #b98aae;
+ --base0F: #a06845;
+ }
+}
diff --git a/src/lib/Styles/details.css b/src/lib/Styles/details.css
new file mode 100644
index 00000000..1f945bdd
--- /dev/null
+++ b/src/lib/Styles/details.css
@@ -0,0 +1,20 @@
+details {
+ background-color: var(--base0011);
+ padding: 1rem;
+ border-radius: 8px;
+}
+
+summary {
+ font-size: 1.05em;
+ font-weight: 600;
+}
+
+summary small {
+ font-weight: normal;
+}
+
+.details-unstyled {
+ background-color: transparent;
+ padding: 0;
+ border-radius: 0;
+}
diff --git a/src/lib/Styles/features.css b/src/lib/Styles/features.css
new file mode 100644
index 00000000..73b5e468
--- /dev/null
+++ b/src/lib/Styles/features.css
@@ -0,0 +1,7 @@
+#mai {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ height: auto;
+ width: 10vh;
+}
diff --git a/src/lib/Styles/input.css b/src/lib/Styles/input.css
new file mode 100644
index 00000000..aa2ae4dd
--- /dev/null
+++ b/src/lib/Styles/input.css
@@ -0,0 +1,132 @@
+input,
+select {
+ cursor: pointer;
+ position: relative;
+ background-color: var(--base01);
+ /* margin: 0; */
+ /* width: 1.15em;
+ height: 1.15em; */
+ padding: 0.25em;
+ border: none;
+ border-radius: 4px;
+ transform: translateY(0.175em);
+ place-content: center;
+ transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
+ box-shadow: 0 4px 30px var(--base01);
+}
+
+@media (prefers-color-scheme: dark) {
+ input,
+ select {
+ background-color: var(--base07);
+ }
+}
+
+input[type='text'],
+input[type='number'],
+input[type='date'],
+input[type='time'],
+button {
+ padding: 0.25em 0.5em;
+}
+
+select {
+ transform: translateY(0em);
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
+ padding: 0.25em 0.5em;
+}
+
+input[type='checkbox'] {
+ -webkit-appearance: none;
+ appearance: none;
+ margin: 0;
+ width: 1.15em;
+ height: 1.15em;
+ transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
+}
+
+input[type='checkbox']:checked {
+ background-color: var(--base0C);
+}
+
+input[type='checkbox']:checked:before {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
+input[type='checkbox']:active {
+ transform: scale(1);
+ transition: transform 0.15s ease-in-out;
+}
+
+input[type='checkbox']:hover {
+ background-color: var(--base0A);
+}
+
+button {
+ cursor: pointer;
+ position: relative;
+ background-color: var(--base0C);
+ color: var(--base00);
+ border: none;
+ border-radius: 4px;
+ transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
+ box-shadow: 0 4px 30px var(--base01);
+}
+
+button:hover {
+ background-color: var(--base0A);
+}
+
+button:active {
+ transform: scale(0.975);
+}
+
+input:disabled,
+select:disabled,
+button:disabled {
+ cursor: not-allowed;
+ opacity: 0.5;
+}
+
+input:disabled:hover,
+select:disabled:hover,
+button:disabled:hover {
+ background-color: var(--base0C);
+}
+
+input:disabled:active,
+select:disabled:active,
+button:disabled:active {
+ transform: scale(1);
+}
+
+.small-button {
+ transform: scale(0.875);
+}
+
+.small-button:active {
+ transform: scale(0.75);
+}
+
+.smaller-button {
+ background-color: var(--base0C);
+ transform: scale(0.75);
+}
+
+.button-square {
+ background-color: var(--base0C);
+ transform: scale(0.75);
+ padding: 0.125em 0.575em;
+}
+
+.button-lined {
+ transform: translateY(0.175em);
+}
+
+.button-action {
+ background-color: var(--base0E);
+}
diff --git a/src/lib/Styles/normalise.css b/src/lib/Styles/normalise.css
new file mode 100644
index 00000000..85f6442c
--- /dev/null
+++ b/src/lib/Styles/normalise.css
@@ -0,0 +1,23 @@
+ul,
+ol {
+ margin: 0;
+}
+
+ul,
+li::marker {
+ content: unset !important;
+}
+
+a:hover {
+ text-decoration: none !important;
+}
+
+a:focus {
+ outline: none;
+}
+
+code {
+ color: var(--base07);
+ padding: 0.25em 0.5em;
+ border-radius: 4px;
+}
diff --git a/src/lib/Styles/typography.css b/src/lib/Styles/typography.css
new file mode 100644
index 00000000..039a365b
--- /dev/null
+++ b/src/lib/Styles/typography.css
@@ -0,0 +1,21 @@
+/* Kosugi, M PLUS 1 Code */
+/* @import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;550;700;800&display=swap'); */
+@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600&family=Roboto:wght@500;700&display=swap');
+
+body {
+ font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
+ Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+ font-size: 1em;
+ line-height: 1.5;
+ font-weight: 500;
+ /* text-shadow: 0 0 0.25em var(--base01); */
+ padding: 1.25rem;
+}
+
+#wrapped {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+ font-weight: 400;
+ text-shadow: none;
+}