Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2016, 09:37 PM   #1
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Question Css Selector for epub:type

Hi everybody!

I've been working with ePubs for a while now and I've always used Calibre. I use the whole package (Library Managment, Viewer, Editor).

I love the Editor, especially because when I started working with the epub3 format it was the first one letting me do so without breaking them.

Most of the time I use simple CSS Classe Selectors to style my books. This time, I decided to test a different aproach, using other kinds of selectors, avoiding to mark the HTML code with classes.

The thing is, it works fine on Calibre Editor (and also on various Reading Systems), but it fails on Calibre Viewer.

Here is a simple example of a selector for footnotes:

Code:
@namespace epub "http://www.idpf.org/2007/ops";
a[epub|type~='noteref'] {
   vertical-align: super;
   line-height: normal;
   font-size: smaller;
}
This selector works as expected on the Editor and other reading apps, but not with the Viewer.

Is it a known problem? Does anyone else experienced that?

Obs.: I've noticed that it only fails when I try to use selectors containing the epub:type attribute.

Last edited by thiago.eec; 12-02-2016 at 09:41 PM. Reason: Another point
thiago.eec is offline   Reply With Quote
Old 12-02-2016, 10:03 PM   #2
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Namespaced selectors are not currently supported in the viewer. That will probably change in the future (the viewer is slated for a rewrite when its codebase will be merged with the new in browser viewer).
kovidgoyal is offline   Reply With Quote
Advert
Old 12-02-2016, 10:12 PM   #3
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
Namespaced selectors are not currently supported in the viewer. That will probably change in the future (the viewer is slated for a rewrite when its codebase will be merged with the new in browser viewer).
Thats it, then. I guess I'll just use the class selectors as always.

Thanks for the fast reply, Kovid.
thiago.eec is offline   Reply With Quote
Reply

Tags
css selectors, epub 3, viewer


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Suggestion] Sigil validator should check missing type="text/css" attribute quiris Sigil 13 01-21-2018 02:00 PM
Epub:type not allowed in epub validator wDr Editor 0 07-01-2016 09:03 PM
Where To Put <style type="text/css"> Code SeaCanary Sigil 4 01-28-2014 08:33 PM
Override ePub CSS with userStyle.css? barium Sony Reader Dev Corner 11 07-16-2011 03:25 PM
Classic Nook crashes on epub with css * selector. aarcane Barnes & Noble NOOK 3 10-08-2010 04:17 PM


All times are GMT -4. The time now is 05:44 PM.


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