MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   how do you get rid of white background (https://www.mobileread.com/forums/showthread.php?t=335401)

2scre 12-05-2020 05:39 PM

how do you get rid of white background
 
I copied and pasted a long text into Sigil and it somehow ended up with white background for the text. (Looks like white highlight when I try to read on a e-reader app). How do you get rid of it?

DiapDealer 12-05-2020 06:10 PM

Not quite enough info. What did you copy from, and what option did you select when you pasted into Sigil's Code View?

What OS are you using and what version of Sigil are you using?

Sigil doesn't typically have a preference (or a default) for background color--other than darkmode and lightmode presentations. CSS controls what background colors are displayed for your epub, not Sigil.

exaltedwombat 12-05-2020 06:46 PM

We're talking about the reading experience, not the appearance of the Sigil editing window? Had you otherwise set the background colour of the book to something other than white?

DiapDealer 12-05-2020 06:53 PM

Quote:

Originally Posted by exaltedwombat (Post 4065840)
We're talking about the reading experience, not the appearance of the Sigil editing window? Had you otherwise set the background colour of the book to something other than white?

I would expect a white background too, if nothing was done with css to change it to something else. Perhaps the OP is using the Sigil dark theme (including for Preview) and assuming any epubs created will be white text on a black background when saved and viewed in an ereading app?

exaltedwombat 12-05-2020 07:48 PM

Quote:

Originally Posted by DiapDealer (Post 4065844)
Perhaps the OP is using the Sigil dark theme (including for Preview) and assuming any epubs created will be white text on a black background when saved and viewed in an ereading app?


Does Dark Mode get to distort the reality of Preview then? I sort of see how that would be popular among lovers of DM, though a bit confusing.

KevinH 12-05-2020 07:56 PM

Only if you set your preferences that way.

DiapDealer 12-05-2020 08:26 PM

Yes. As Kevin said, you have to consciously choose to allow Preview to override the default foreground/background colors in dark mode. With the default settings, dark mode has no effect on Preview's rendering of the epub.

2scre 12-06-2020 02:35 PM

Quote:

Originally Posted by exaltedwombat (Post 4065840)
We're talking about the reading experience, not the appearance of the Sigil editing window? Had you otherwise set the background colour of the book to something other than white?

yes, reading experience in my e-reader app, not in Sigil.

I didn't set the background color, but when I copied the text probably it copied the background color of the browser (which happens to be white) together with the text.

What happens is, the background color of the e-reader that I'm trying to read in will only show at the edge of the book and the text will be surrounded by white highlight, so that I can't go completely dark mode like I can on other books.

I was wondering how to edit the CSS so that the white higlight will be gone from the whole text.

2scre 12-07-2020 03:44 PM

Basically I see a lot of these throughout my ePub file:

Quote:

<br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12.96px; background-color: rgb(255, 255, 255);"
So to get rid of the background color how should I go about doing this?

exaltedwombat 12-07-2020 04:20 PM

Well, an obvious thing to try would be a search for "background-color: rgb(255, 255, 255);" replacing it with an empty string. In the stylesheet as well as the chapter files. The example you give, styling a linebreak, is not in itself going to be the culprit though!

Work on a copy of the EPUB file in case it goes horribly wrong!

2scre 12-07-2020 05:49 PM

Quote:

Well, an obvious thing to try would be a search for "background-color: rgb(255, 255, 255);" replacing it with an empty string.
Thank you. This worked.

I don't know what you mean by this:
Quote:

The example you give, styling a linebreak, is not in itself going to be the culprit though!

theducks 12-07-2020 10:13 PM

Quote:

Originally Posted by 2scre (Post 4066533)
Thank you. This worked.

I don't know what you mean by this:

BR is a HTML way of starting a New line. In itself it display NO CHARACTERS, therefor has no color.

Hitch 12-11-2020 04:26 PM

Quote:

Originally Posted by 2scre (Post 4066460)
Basically I see a lot of these throughout my ePub file:



So to get rid of the background color how should I go about doing this?

Not sure of the genesis, but I see this ALL the time from Mac-based files, both Pages (especially) and Word4Mac files created from those selfsame Pages files.

Are you a Pages user?

Hitch

2scre 12-12-2020 10:01 AM

I am a Mac user, but Pages was not involved. I pasted it into Gmail as a draft first and then copied it from gmail to Sigil.

Hitch 12-12-2020 12:31 PM

Quote:

Originally Posted by 2scre (Post 4068186)
I am a Mac user, but Pages was not involved. I pasted it into Gmail as a draft first and then copied it from gmail to Sigil.

Okay, but where did it come from, before you pasted it into GMail? Where did you type it, or...? Are you saying that you typed your book into the email program? I mean, pasting implies that it existed someplace else, first and you copy-pasted it, yes? So...where was it living prior to Gmail? (Do you mean Google Docs?)

Hitch


All times are GMT -4. The time now is 08:07 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.