Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 08-02-2022, 06:44 AM   #1
sujato
Junior Member
sujato began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2022
Device: none
mangled em-dash as a CSS pseudo-element

Hi all, hope you're doing well.

I'm adding a spaced em-dash via a CSS rule:

Code:
title::after
{
    content: ' — ';
}
In other readers it works just fine, but when I open in Calibre, the em-dash has been replaced:

Code:
title::after {
    content: ' — ';
}
Em-dash in the text body works fine, it's only the pseudo-element that's causing a problem.

Both the CSS and the XHTML files are defined as utf-8.

Any ideas would be helpful!
sujato is offline   Reply With Quote
Old 08-02-2022, 06:46 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,464
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Why? Just put the em-dash in the HTML as it normally is.

A lot of CSS pseudo elements don't always work. It's best (IMHO) not to use them.

Last edited by JSWolf; 08-02-2022 at 07:03 AM.
JSWolf is offline   Reply With Quote
Advert
Old 08-02-2022, 06:47 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Attach a minimal complete example ebook showing the problem
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Em dash and en dash in Comment? kakkalla Library Management 3 06-11-2020 06:58 AM
Problem with em dash, en dash and apostrophes jerrywat Conversion 4 10-25-2012 10:43 AM
K3 is mangled - cannot update to 3.4 horizon21 Kindle Developer's Corner 20 10-12-2012 11:31 AM
Touch CSS pseudo-elements in an EPUB: Supported? Benjamin Buford Kobo Reader 10 07-07-2011 04:08 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 06:09 PM


All times are GMT -4. The time now is 04:42 PM.


MobileRead.com is a privately owned, operated and funded community.