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 07-18-2020, 11:34 PM   #1
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Some css are automatically removed by Editor

Dear Kovid,

The Editor seems to remove all css items related to :root

Let's say I have this:
Code:
:root {
  --margin-top: 0.5em;
  --magin-bottom: 8em;
}

div.x {
 margin-top: var(--margin-top);
}

div.y {
  margin-bottom: var(--margin-bottom);
}
they are all removed upon Editor opening the epub.
nqk is offline   Reply With Quote
Old 07-19-2020, 12:34 AM   #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: 45,271
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
works fine for me, you probably have the auto beatify setting enabled. :root is not supported by the library used for beautification.
kovidgoyal is online now   Reply With Quote
Advert
Old 07-19-2020, 01:44 AM   #3
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Ah, I didn't know that. Thanks.
nqk is offline   Reply With Quote
Old 07-19-2020, 11:49 PM   #4
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Dear Kovid,

I think the Editor supports :root but not the viewer (?). Please see the attachment when you have a moment. There are two issues there, (i) :root and (ii) border-image. I don't know why the viewer doesn't show the svg border image in the second file, while Editor does.
Attached Files
File Type: epub Border-Image-Test.epub (3.9 KB, 176 views)
nqk is offline   Reply With Quote
Old 07-20-2020, 12:16 AM   #5
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: 45,271
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Switch the viewer to flow mode, it might work there, but it is never going to work in paged mode. And why are you using :root anyway, it's a synnym for html anyway.
kovidgoyal is online now   Reply With Quote
Advert
Old 07-20-2020, 01:13 AM   #6
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by kovidgoyal View Post
Switch the viewer to flow mode, it might work there, but it is never going to work in paged mode. And why are you using :root anyway, it's a synnym for html anyway.
In certain ebooks there are several "color, background-color" values, nothing fancy, just various shades, :root helps to control them better. Anyway, the :root is respected in User Styles.

How about the svg border-image? I wonder why the second page doesn't show it while the first with no problem.

Last edited by nqk; 07-20-2020 at 01:24 AM.
nqk is offline   Reply With Quote
Old 07-20-2020, 01:32 AM   #7
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: 45,271
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Because paged mode splits up the view using CSS columns, applying anything to the entire document is meaningless in paged mode.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editor shuts down automatically mathil Editor 26 02-19-2020 05:20 PM
a-z css editor solution rjwse@aol.com Editor 4 04-07-2018 01:09 PM
Kobo Aura H20 bottom space not removed via css. masterz87 Kobo Reader 18 01-22-2017 10:47 AM
[old thread] non breaking spaces (* and  ) automatically removed artoros Sigil 31 09-04-2014 06:23 PM
Tweak epub and Simple CSS Editor Shadowman123 Calibre 11 09-30-2010 10:07 AM


All times are GMT -4. The time now is 02:24 AM.


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