mirror of
https://github.com/kvasonaft/fb2-reader.git
synced 2026-07-22 08:31:14 +00:00
Obsidian applies user-select: none to its UI chrome, which custom views inherit, so book text couldn't be selected or copied. Re-enable user-select on the reader container. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
245 lines
4.6 KiB
CSS
245 lines
4.6 KiB
CSS
.fb2-reader {
|
|
overflow-y: auto;
|
|
/* Obsidian sets user-select: none on its UI chrome; custom views inherit
|
|
it, which blocks selecting and copying book text. Re-enable it here. */
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
}
|
|
|
|
/* Forced color schemes for the reading area. Obsidian theme variables are
|
|
overridden locally so nested elements pick up matching colors. */
|
|
body.fb2-theme-dark .fb2-reader {
|
|
--background-primary: #000000;
|
|
--background-secondary: #000000;
|
|
background-color: #000000;
|
|
color: #d6d6d6;
|
|
--text-normal: #d6d6d6;
|
|
--text-muted: #9c9ca4;
|
|
--text-error: #ff6b6b;
|
|
--link-color: #7ab8f5;
|
|
--link-external-color: #7ab8f5;
|
|
--background-modifier-border: #3a3a42;
|
|
--background-modifier-hover: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
body.fb2-theme-light .fb2-reader {
|
|
--background-primary: #ffffff;
|
|
--background-secondary: #ffffff;
|
|
background-color: #ffffff;
|
|
color: #232323;
|
|
--text-normal: #232323;
|
|
--text-muted: #6c6c68;
|
|
--text-error: #c0392b;
|
|
--link-color: #1c6dbb;
|
|
--link-external-color: #1c6dbb;
|
|
--background-modifier-border: #d9d9d2;
|
|
--background-modifier-hover: rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
body.fb2-theme-sepia .fb2-reader {
|
|
--background-primary: #f4ecd8;
|
|
--background-secondary: #f4ecd8;
|
|
background-color: #f4ecd8;
|
|
color: #5b4636;
|
|
--text-normal: #5b4636;
|
|
--text-muted: #8a7a62;
|
|
--text-error: #a83a2a;
|
|
--link-color: #7b5233;
|
|
--link-external-color: #7b5233;
|
|
--background-modifier-border: #d8cbb0;
|
|
--background-modifier-hover: rgba(91, 70, 54, 0.08);
|
|
}
|
|
|
|
/* Solarized Dark (Ethan Schoonover): base03 background, base0 body text,
|
|
base01 muted, blue accent for links. */
|
|
body.fb2-theme-solarized-dark .fb2-reader {
|
|
--background-primary: #002b36;
|
|
--background-secondary: #002b36;
|
|
background-color: #002b36;
|
|
color: #839496;
|
|
--text-normal: #839496;
|
|
--text-muted: #586e75;
|
|
--text-error: #dc322f;
|
|
--link-color: #268bd2;
|
|
--link-external-color: #268bd2;
|
|
--background-modifier-border: #073642;
|
|
--background-modifier-hover: rgba(147, 161, 161, 0.1);
|
|
}
|
|
|
|
body.fb2-theme-dark .fb2-reader a,
|
|
body.fb2-theme-light .fb2-reader a,
|
|
body.fb2-theme-sepia .fb2-reader a,
|
|
body.fb2-theme-solarized-dark .fb2-reader a {
|
|
color: var(--link-color);
|
|
}
|
|
|
|
.fb2-book {
|
|
max-width: 44em;
|
|
margin: 0 auto;
|
|
padding: 2em 1.5em 4em;
|
|
font-family: var(--fb2-font-family, inherit);
|
|
font-size: var(--fb2-font-size, 1.05em);
|
|
line-height: var(--fb2-line-height, 1.5);
|
|
color: var(--fb2-text-color, inherit);
|
|
}
|
|
|
|
.fb2-title-page {
|
|
text-align: center;
|
|
margin-bottom: 3em;
|
|
}
|
|
|
|
.fb2-cover {
|
|
max-width: 60%;
|
|
max-height: 60vh;
|
|
margin: 0 auto 1.5em;
|
|
display: block;
|
|
border-radius: 4px;
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.fb2-book-title {
|
|
margin-bottom: 0.2em;
|
|
}
|
|
|
|
.fb2-authors {
|
|
color: var(--text-muted);
|
|
font-size: 1.1em;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.fb2-annotation {
|
|
font-style: italic;
|
|
color: var(--text-muted);
|
|
text-align: left;
|
|
margin-top: 1.5em;
|
|
}
|
|
|
|
.fb2-title {
|
|
text-align: center;
|
|
margin-top: 2em;
|
|
}
|
|
|
|
.fb2-p {
|
|
margin: 0.3em 0;
|
|
text-align: justify;
|
|
hyphens: auto;
|
|
}
|
|
|
|
/* First-line paragraph indent. Implemented as an inline spacer instead of
|
|
text-indent: compatibility checkers flag that property because of its
|
|
partially supported keyword values (hanging, each-line). */
|
|
.fb2-p::before {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 1.5em;
|
|
}
|
|
|
|
.fb2-empty-line {
|
|
height: 1em;
|
|
}
|
|
|
|
.fb2-subtitle {
|
|
text-align: center;
|
|
font-weight: 600;
|
|
margin-top: 1.5em;
|
|
}
|
|
|
|
.fb2-epigraph {
|
|
margin: 1.5em 0 1.5em auto;
|
|
max-width: 70%;
|
|
font-style: italic;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.fb2-epigraph .fb2-p {
|
|
text-align: right;
|
|
}
|
|
|
|
.fb2-epigraph .fb2-p::before {
|
|
display: none;
|
|
}
|
|
|
|
.fb2-cite {
|
|
font-style: italic;
|
|
}
|
|
|
|
.fb2-poem {
|
|
margin: 1.5em auto;
|
|
width: fit-content;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.fb2-stanza {
|
|
margin: 1em 0;
|
|
}
|
|
|
|
.fb2-verse {
|
|
margin: 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.fb2-text-author {
|
|
text-align: right;
|
|
font-style: italic;
|
|
}
|
|
|
|
.fb2-image-block {
|
|
display: block;
|
|
max-width: 100%;
|
|
margin: 1.5em auto;
|
|
}
|
|
|
|
.fb2-image-inline {
|
|
max-height: 1.4em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.fb2-table {
|
|
margin: 1.5em auto;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.fb2-table td,
|
|
.fb2-table th {
|
|
border: 1px solid var(--background-modifier-border);
|
|
padding: 0.3em 0.7em;
|
|
}
|
|
|
|
.fb2-notes {
|
|
margin-top: 3em;
|
|
font-size: 0.9em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.fb2-toc {
|
|
padding: 0.5em;
|
|
}
|
|
|
|
.fb2-toc-book {
|
|
font-weight: 600;
|
|
margin-bottom: 0.6em;
|
|
padding: 0 6px;
|
|
}
|
|
|
|
.fb2-toc-item {
|
|
cursor: pointer;
|
|
padding: 3px 6px;
|
|
border-radius: 4px;
|
|
font-size: 0.9em;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.fb2-toc-item:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.fb2-toc-empty {
|
|
color: var(--text-muted);
|
|
padding: 0 6px;
|
|
}
|
|
|
|
.fb2-error {
|
|
color: var(--text-error);
|
|
text-align: center;
|
|
margin-top: 3em;
|
|
}
|