fix(epub): improve image display and caption alignment

- Remove box-shadow and border-radius from images to eliminate unwanted backgrounds
- Set explicit transparent background for images and figures
- Remove duplicate image styling blocks for cleaner CSS
- Change figcaption alignment from center to left for better readability
- Add border and outline none to prevent inherited styling issues
- Consolidate image styling into single Enhanced Figure section
This commit is contained in:
Vijay Janapa Reddi
2025-08-16 15:55:03 -04:00
parent be95a64a1f
commit c427d8f569

View File

@@ -234,19 +234,12 @@ figure {
page-break-inside: avoid;
}
img {
max-width: 100%;
height: auto;
display: block;
margin-left: auto;
margin-right: auto;
border-radius: 4px; /* Subtle rounding for images */
}
/* Image styling moved to Enhanced Figure and Image Styling section */
figcaption {
font-size: 0.9em;
font-style: italic;
text-align: center;
text-align: left;
margin-top: 0.8em;
color: #6c757d; /* Softer gray for captions */
}
@@ -338,6 +331,98 @@ table caption,
display: none !important;
}
/* ==========================================================================
EPUB Title Page Styling
========================================================================== */
/* Title page container */
section[epub|type="titlepage"],
.titlepage,
#titlepage {
text-align: center;
padding: 2rem 1rem;
page-break-after: always;
min-height: 80vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* Main title styling */
h1[epub|type="title"],
.title-page h1,
#titlepage h1 {
font-size: 2.5em;
font-weight: 700;
color: var(--crimson);
margin-bottom: 0.5rem;
line-height: 1.2;
text-align: center;
border: none;
padding: 0;
}
/* Subtitle styling */
h2[epub|type="subtitle"],
.title-page h2,
#titlepage h2 {
font-size: 1.4em;
font-weight: 400;
color: var(--text-secondary);
margin-bottom: 2rem;
font-style: italic;
line-height: 1.3;
text-align: center;
border: none;
padding: 0;
}
/* Author information styling */
p[epub|type="author"],
.title-page .author,
#titlepage .author,
.title-page p:has-text("Prof."),
#titlepage p:contains("Prof.") {
font-size: 1.2em;
font-weight: 500;
color: var(--text-primary);
margin: 1.5rem 0;
text-align: center;
}
/* Publisher and affiliation styling */
.title-page .publisher,
.title-page .affiliation,
#titlepage .publisher,
#titlepage .affiliation {
font-size: 1em;
color: var(--text-secondary);
margin: 0.5rem 0;
text-align: center;
}
/* Date styling on title page */
.title-page .date,
#titlepage .date {
font-size: 0.9em;
color: var(--text-muted);
margin-top: 2rem;
text-align: center;
}
/* Copyright and rights information */
.title-page .rights,
.title-page .copyright,
#titlepage .rights,
#titlepage .copyright {
font-size: 0.8em;
color: var(--text-muted);
margin-top: auto;
text-align: center;
padding-top: 2rem;
}
/* ==========================================================================
Callouts and Special Elements
========================================================================== */
@@ -408,6 +493,7 @@ figure {
padding: 0;
page-break-inside: avoid;
text-align: center;
background: transparent;
}
img {
@@ -416,14 +502,15 @@ img {
display: block;
margin-left: auto;
margin-right: auto;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
background: transparent;
border: none;
outline: none;
}
figcaption {
font-size: 0.9rem;
font-style: italic;
text-align: center;
text-align: left;
margin-top: 1rem;
color: var(--text-muted);
line-height: 1.4;