Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question about userContent.css and blank page backgrounds

281 views
Skip to first unread message

Big Al

unread,
Dec 11, 2017, 4:53:51 PM12/11/17
to mozilla-sup...@lists.mozilla.org
I found documentation on how to change the color of both the about:blank
and about:newtab page backgrounds. userContent.css would contain the
following:

@-moz-document url("about:newtab") {
body {
background-color: #C9FFC9 !important; /* pale green */
color: black !important;
}
}

@-moz-document url("about:blank") {
body {
background-color: black !important;
color: black !important;
}
}

In playing with the colors in about:blank I tried a yellowish or manila
color that kinda worked but finally went to the black as it shows above.

The only problem is that occasionally I pull up a website that starts
with this old yellowish background, and it stays there until Firefox
downloads more of the webpage and then I get the right background as the
designer wanted it. But it's yellow for that 1-3 seconds depending of
load speed.

Also there are a few sites that oddly don't have any background color
specified, the page downloads and I get all the info and ads and
logos/images but this yellowish background persists.

I found one site that does not change the background and looked at the
source and sure enough there is no bgcolor specs.:
<html>
<head>
<title>Appointment Reminder Confirmation</title>
</head>
<body>
<table style="width: 100%; height: 100%;">
<tr> etc etc etc

I can't give you a link since this one is a confirmation for a doctor
appointment and I don't want 100's of people confirming it. :-)

Question is: Where is this yellow background coming from. Is there
some other about:??? that I can set to get rid of it and set it back to
white? Luckily it's not an offensive lime green but white would sure
be better.

Dave Royal

unread,
Dec 12, 2017, 2:24:00 AM12/12/17
to mozilla-sup...@lists.mozilla.org
Big Al <Bi...@invalid.com> Wrote in message:
><snip>
> logos/images but this yellowish background persists.
>
> Question is: Where is this yellow background coming from. Is there
> some other about:??? that I can set to get rid of it and set it back to
> white? Luckily it's not an offensive lime green but white would sure
> be better.
>
How odd. Maybe it's cached. Does it persist if you clear the
cache? Or reload about:blank bypassing cache? I'm surprised
about:blank is an actual page that can be styled, though.


ISTR reading that if you open a site in a new tab it starts with
about:blank - but that was Android. And I've known sites that
lose an applied style when you hit 'back' (which would the bf
cache) though I think that's a bug.

Your post reminded me that I styled about:home in userContent.css,
and it's stopped working since 57.
--
(Remove numerics from my email address)

Ocalab

unread,
Dec 12, 2017, 1:08:26 PM12/12/17
to mozilla-sup...@lists.mozilla.org
Where did you find that documentation? Please share it - or (preferably
do both) tell us what you searched for. It is not so easy to find those...


--
=
If this messages and others are off-topic,
disconsider that part of it, or ask it to be
moved to another group. If someone replied
here, my opinion is that there is no problem
with that - something that is really rare, IMO.

Big Al

unread,
Dec 12, 2017, 1:10:38 PM12/12/17
to mozilla-sup...@lists.mozilla.org
Adding about:home to the userContent.css I was able to change the
background in about:home. So if you want, you can do that much.

I've cleared the cache a few times.
And https://www.gosquared.com/global/windows/10/#launch background is
this yellowish color I can't drop.

It is something in the profile. I created a new profile and the above
link comes up with a all white background. So I guess I'll just try
dropping a few things and see where I lose it. At least now I'm onto
something. All my settings are synced so maybe that will bring back
just settings and not cache.

If I find something I'll post it. Thanks.

Big Al

unread,
Dec 12, 2017, 1:10:54 PM12/12/17
to mozilla-sup...@lists.mozilla.org
On 12/12/2017 02:23 AM, Dave Royal wrote:
prefs.js or about:config. browser.display.background_color was set to
the yellowish color. Changed it to #FFFFFF white and all is great.
I never set it but something obviously did.


Big Al

unread,
Dec 12, 2017, 1:13:40 PM12/12/17
to mozilla-sup...@lists.mozilla.org
It was probably someone's post on this newsgroup.

5

unread,
Dec 12, 2017, 10:58:42 PM12/12/17
to mozilla-sup...@lists.mozilla.org
On 12/11/2017 01:59 PM, Ocalab wrote:
> Em 11-12-2017 19:33, Big Al escreveu:
>> I found documentation on how to change the color of both the about:blank
>> and about:newtab page backgrounds. userContent.css would contain the
>> following:
>>
>> @-moz-document url("about:newtab") {
>> body {
>> background-color: #C9FFC9 !important; /* pale green */
>> color: black !important;
>> }
>> }
>>
>> @-moz-document url("about:blank") {
>> body {
>> background-color: black !important;
>> color: black !important;
>> }
>> }

....

> Where did you find that documentation? Please share it - or (preferably
> do both) tell us what you searched for. It is not so easy to find those...

<https://superuser.com/questions/318912/how-to-override-the-css-of-a-site-in-firefox-with-usercontent-css#319322>
covers it.

I use about:blank as FF's start, home, and newtab pages, and often use a
bookmarklet to turn it black after it loads.

I just copy/pasted Big Al's code into userContent.css ... it works.

The line
color: black !important;
appears redundant. It works the same with or without it.

Dave Royal

unread,
Dec 13, 2017, 2:28:17 AM12/13/17
to mozilla-sup...@lists.mozilla.org
5 <fi...@kmail.com> Wrote in message:
I still refer to dbaron's post for alternative @moz-document forms
https://tinyurl.com/per-site-stylesheet-rules

To use userContent.css on Firefox for Android you need root
access. The Stylus addon mostly works on Android BTW, but
webextensions cannot change about: pages.

Big Al

unread,
Dec 13, 2017, 12:46:27 PM12/13/17
to mozilla-sup...@lists.mozilla.org
On 12/12/2017 10:57 PM, 5 wrote:
> The line
>    color: black !important;
> appears redundant. It works the same with or without it.
Now that you mention it, you're right. A blank page with no text
doesn't need to have the text color set to black.

EE

unread,
Dec 14, 2017, 3:10:52 PM12/14/17
to mozilla-sup...@lists.mozilla.org
To change the default body background (but not override), I used this in
userContent.css:
/* Change default backgrounds */
body {background-color: #FFE0C0;}

That gives a beige background.

0 new messages