mirror of
https://github.com/kvasonaft/fb2-reader.git
synced 2026-07-22 08:31:14 +00:00
Update the default reading settings: line height 1.65 -> 1.5 and font size 17px -> 16px, including the CSS fallback and the settings hints. Existing users keep their saved values. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
252 lines
4.8 KiB
CSS
252 lines
4.8 KiB
CSS
.fb2-reader {
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* 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);
|
|
}
|
|
|
|
body.fb2-theme-dark .fb2-reader a,
|
|
body.fb2-theme-light .fb2-reader a,
|
|
body.fb2-theme-sepia .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);
|
|
}
|
|
|
|
/* "Return to text" link left at the destination of a footnote jump. */
|
|
.fb2-backref {
|
|
display: inline-block;
|
|
margin-left: 0.5em;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Drop caps (enabled via the plugin setting): a large initial letter on the
|
|
opening paragraph of a chapter — the first paragraph of a section, or the
|
|
one right after the chapter title or epigraph. */
|
|
body.fb2-dropcaps .fb2-section > .fb2-p:first-child::first-letter,
|
|
body.fb2-dropcaps .fb2-title + .fb2-p::first-letter,
|
|
body.fb2-dropcaps .fb2-epigraph + .fb2-p::first-letter {
|
|
float: left;
|
|
font-size: 3.2em;
|
|
line-height: 0.85;
|
|
padding-right: 0.08em;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* A drop-cap paragraph starts flush left: no first-line indent spacer. */
|
|
body.fb2-dropcaps .fb2-section > .fb2-p:first-child::before,
|
|
body.fb2-dropcaps .fb2-title + .fb2-p::before,
|
|
body.fb2-dropcaps .fb2-epigraph + .fb2-p::before {
|
|
display: none;
|
|
}
|
|
|
|
.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;
|
|
}
|