mmarusiak_pdf-emojis-plugin/style.css
Marcel f63b15d57e fix: use U+2060 Word Joiner to prevent Obsidian PDF from stripping heading numbers
The previous span-only approach failed because Obsidian's PDF export strips
leading digits from heading text via pattern matching (not CSS), happening after
post-processors run. Inserting U+2060 (Word Joiner, zero-width invisible char)
before the digit breaks the regex match so the number is preserved.

Also added @media print CSS rules and ::first-letter overrides as defense-in-depth.
2026-05-18 21:25:49 +02:00

30 lines
No EOL
767 B
CSS

.emoji {
font-weight: normal !important;
font-style: normal !important;
}
.pdf-heading-number {
display: inline !important;
visibility: visible !important;
opacity: 1 !important;
color: inherit !important;
font-size: inherit !important;
}
@media print {
.pdf-heading-number {
display: inline !important;
visibility: visible !important;
opacity: 1 !important;
color: inherit !important;
font-size: inherit !important;
}
h1::first-letter, h2::first-letter, h3::first-letter,
h4::first-letter, h5::first-letter, h6::first-letter {
font-size: inherit !important;
color: inherit !important;
visibility: visible !important;
opacity: 1 !important;
}
}