mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-28 03:07:40 +02:00
229 lines
4.5 KiB
CSS
229 lines
4.5 KiB
CSS
:root {
|
|
/* Unix/Terminal Aesthetic Palette */
|
|
--bg: #0d1117;
|
|
--text: #c9d1d9;
|
|
--text-dim: #8b949e;
|
|
--border: #30363d;
|
|
--primary: #238636;
|
|
--primary-hover: #2ea043;
|
|
--secondary: #21262d;
|
|
--secondary-hover: #30363d;
|
|
--accent: #58a6ff;
|
|
--highlight: rgba(241, 250, 140, 0.1); /* Subtle Dracula Yellow */
|
|
|
|
--margin: 1rem;
|
|
--line-height: 1.5;
|
|
--font-mono: "Fira Code", "JetBrains Mono", "Cascadia Code", "Source Code Pro", "Menlo", "Monaco", "Consolas", monospace;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
width: 100%;
|
|
font-family: var(--font-mono);
|
|
background-color: var(--bg);
|
|
color: var(--text);
|
|
overflow: hidden;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
#nav {
|
|
display: flex;
|
|
height: 3.5rem;
|
|
padding: 0 var(--margin);
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background-color: var(--bg);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.nav-left .title {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
color: var(--text-dim);
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.nav-left .title:hover { color: var(--text); }
|
|
|
|
.source-link {
|
|
font-size: 0.75rem !important;
|
|
padding: 0.2rem 0.5rem !important;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.nav-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.nav-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0.4rem 0.8rem;
|
|
border-radius: 4px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
border: 1px solid var(--border);
|
|
font-family: inherit;
|
|
transition: all 0.1s ease;
|
|
}
|
|
|
|
.primary { background-color: var(--primary); color: #ffffff; }
|
|
.secondary { background-color: var(--secondary); color: var(--text); }
|
|
|
|
#metadata {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
font-size: 0.8rem;
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
main {
|
|
flex-grow: 1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 0 var(--margin) var(--margin) var(--margin);
|
|
}
|
|
|
|
.content-wrapper {
|
|
flex-grow: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
width: 100%;
|
|
height: 100%;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
#paste-form {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
textarea {
|
|
flex-grow: 1;
|
|
width: 100%;
|
|
font-family: inherit;
|
|
font-size: 0.95rem;
|
|
line-height: var(--line-height);
|
|
border: none;
|
|
outline: none;
|
|
background-color: transparent !important;
|
|
color: inherit;
|
|
resize: none;
|
|
padding: 0.5rem;
|
|
white-space: pre;
|
|
overflow: auto;
|
|
}
|
|
|
|
pre, code {
|
|
background: transparent !important;
|
|
padding: 0 !important;
|
|
margin: 0 !important;
|
|
font-family: inherit !important;
|
|
font-size: inherit !important;
|
|
line-height: var(--line-height) !important;
|
|
}
|
|
|
|
code.with-line-numbers {
|
|
display: block;
|
|
}
|
|
|
|
.line {
|
|
display: grid;
|
|
grid-template-columns: calc(var(--digits, 1) * 1ch + 2rem) minmax(0, 1fr);
|
|
width: 100%;
|
|
min-height: calc(1em * var(--line-height));
|
|
/* Breathing room when targeting a line */
|
|
scroll-margin-top: 2rem;
|
|
}
|
|
|
|
.line-number {
|
|
grid-column: 1;
|
|
text-align: right;
|
|
padding-right: 1rem;
|
|
color: var(--text-dim);
|
|
opacity: 0.3;
|
|
border-right: 1px solid var(--border);
|
|
user-select: none;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.line-number:hover {
|
|
opacity: 0.8;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.line-code {
|
|
grid-column: 2;
|
|
padding-left: 1rem;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
/*
|
|
Line Highlight via URL Hash (#L315)
|
|
*/
|
|
.line:target {
|
|
background-color: var(--highlight);
|
|
}
|
|
|
|
.line:target .line-number {
|
|
opacity: 1;
|
|
color: #f1fa8c; /* Dracula Yellow */
|
|
border-right-color: #f1fa8c;
|
|
border-right-width: 2px;
|
|
}
|
|
|
|
/* Selection */
|
|
::selection { background: rgba(59, 130, 246, 0.4); color: #ffffff; }
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--secondary); }
|
|
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border-width: 0;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
#metadata { display: none; }
|
|
.line { grid-template-columns: 1fr; }
|
|
.line-number { display: none; }
|
|
.line-code { padding-left: 0; }
|
|
}
|