Help with user style sheet for Firefox

B

Bob

I use a user style sheet, usercontent.css, that looks like this:

body {
color: #787878 !important;
}

font {
color: #787878 !important;
}

div {
color: #787878 !important;
}

p {
color: #787878 !important;
}

td {
color: #787878 !important;
}

..verdanamb {
color: #787878 !important;
}

I then use Web Developer to attach it various pages that I visit. Works
great, with some exceptions. I do this because my aging CRT monitor
hurts my eyes unless I hack down the black-white contrast on the
monitor. Will work until I can afford a new monitor.

I am looking at a webpage that is using inline styles, to whit:

<span style="color: black;">

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}
 
M

mbstevens

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}


You are causing confusion by making everything "!important;" .
Remove all but those for which you have a clearly understood need.
Search for 'style precedence' or 'important' at w3.org.

span style{color: #777;} will give a middle-ish gray. You have to be
sure the background has *some* contrast with that.
 
M

mbstevens

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}

You are causing confusion by making everything "!important;" .
Remove all but those for which you have a clearly understood need.
Search for 'style precedence' or 'important' at w3.org.

span style{color: #777;} will give a middle-ish gray. You have to be
sure the background has *some* contrast with that.
 
M

mbstevens

span style{color: #777;} will give a middle-ish gray. You have to be
sure the background has *some* contrast with that.

That's wrong, actually.
It should be:
<span style = "color:#777;"> ... </span>
 
C

Chris Vogel

Bob said:
<span style="color: black;">

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}

span[style]
{
color: #787878 !important;
}

But it sounds like you want to change the text color of the entire
page. You could replace your entire style sheet with something like this:

html, html *
{
color: #787878 !important;
}

The text will be unreadable if the site's style sheet has a background
color too close to your text color. This would take care of that,
although it would drastically change the look of some pages:

html, html *
{
color: #787878 !important;
background-color: #ffffff !important;
background-image: none !important;
}
 
C

Chris Vogel

mbstevens said:
You are causing confusion by making everything "!important;" .
Remove all but those for which you have a clearly understood need.
Search for 'style precedence' or 'important' at w3.org.

This is a user style sheet, not an author one. Including the
"!important" ensures that he overrides the default browser style and
the site's style.
 
B

Bob

Chris said:
Bob said:
<span style="color: black;">

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}

span[style]
{
color: #787878 !important;
}

But it sounds like you want to change the text color of the entire
page.

Not necessarily. I don't mind colored links and whatnot. I am mostly
concerned with long article texts.

You could replace your entire style sheet with something like this:
html, html *
{
color: #787878 !important;
}

The text will be unreadable if the site's style sheet has a background
color too close to your text color.

Sometimes the grey is unreadable on a, say, red or pink background
color. In that case, I choose Edit CSS in WebDeveloper and try to find
the background color line that is effecting the page and just delete it.
Then I can read the page.

This would take care of that,
although it would drastically change the look of some pages:

html, html *
{
color: #787878 !important;
background-color: #ffffff !important;
background-image: none !important;
}

Thx, sounds a bit too extreme for now.

I just figured out you can go to Tools - Options - Content - Colors -
(Choose a color), then *uncheck let pages override my fonts and colors,
and thereby set it globally in Firefox pretty well. We'll see how that
works.

I kind of like the user.css better cuz you can fine-tune it more
granually to the given page.
 
B

Bob

Chris said:
This is a user style sheet, not an author one. Including the
"!important" ensures that he overrides the default browser style and
the site's style.

Exactly. Actually, it's quite important to do that.
 
C

Chris Vogel

Bob said:
I just figured out you can go to Tools - Options - Content - Colors -
(Choose a color), then *uncheck let pages override my fonts and colors,
and thereby set it globally in Firefox pretty well. We'll see how that
works.

Hehe! I'm embarrassed that I forgot about that.
 
N

Neredbojias

To further the education of mankind said:
... I do this because my aging CRT monitor
hurts my eyes unless I hack down the black-white contrast on the
monitor. Will work until I can afford a new monitor.

Not that you haven't thought of this, but doesn't your monitor have
contrast/brightness adjustment?
I am looking at a webpage that is using inline styles, to whit:

<span style="color: black;">

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}

Yes. ...I think.
 
B

Bob

Neredbojias said:
Not that you haven't thought of this, but doesn't your monitor have
contrast/brightness adjustment?

Not sure if you know this, but CRT monitors, when they get old, they get
really hard to view. They hurt your eyes. One of the things that goes is
the contrast. CRT monitors work via some kind of jets that shoot
something at the screen. After years, this jet substance starts to gum
up the screen in some way.

To answer you, I have been monkeying with contrast/brightness/gamma and
everything else on the monitor, video card, you name it, for months on
end now, and I have not been able to fix this problem no matter where I
set it to. The guys on the Linux group said the monitor is shot.
Yes. ...I think.

I have it set to this now:

span[style] {
color: #787878 !important;
}

And it seems to be working.
 
B

Ben C

I'm sure you could find a good CRT for next to nothing, I often see
offices throwing out heaps of them, presumably because they've upgraded
to LCDs. You see a good many if you just go to the dump, probably quite
a few of which work perfectly.
Not sure if you know this, but CRT monitors, when they get old, they get
really hard to view. They hurt your eyes. One of the things that goes is
the contrast. CRT monitors work via some kind of jets that shoot
something at the screen.

They shoot electrons, which light up the phosphor coating wherever they
hit it.
After years, this jet substance starts to gum up the screen in some
way.

You don't get residual electrons gummed up on the screen, but maybe the
phosphor on the screen degrades somehow.
 
H

Harlan Messinger

Neredbojias said:
Not that you haven't thought of this, but doesn't your monitor have
contrast/brightness adjustment?


Yes. ...I think.
No. There isn't any STYLE tag.
 
N

Neredbojias

To further the education of mankind, Harlan Messinger
No. There isn't any STYLE tag.

True, but when I read it, I mentally assigned "style" as implicit. Grr.
 
N

Neredbojias

To further the education of mankind said:
Not sure if you know this, but CRT monitors, when they get old, they get
really hard to view. They hurt your eyes. One of the things that goes is
the contrast. CRT monitors work via some kind of jets that shoot
something at the screen. After years, this jet substance starts to gum
up the screen in some way.

To answer you, I have been monkeying with contrast/brightness/gamma and
everything else on the monitor, video card, you name it, for months on
end now, and I have not been able to fix this problem no matter where I
set it to. The guys on the Linux group said the monitor is shot.

I've got a 10+ yr old NEC crt that's surely dimmed a bit but doesn't seem
to have the problem yours does. Anyway, I'm not contesting your
conclusion but will add that they sell screen filters for over-contrasty
monitors as well.
Yes. ...I think.

I have it set to this now:

span[style] {
color: #787878 !important;
}

And it seems to be working.

Why not just:

span { color:#787878 !important; }

??

Also, this was probably already discussed, but you could:

body,span {
background:#383838 !important;
color:#787878 !important;
}

to cover more ground efficiently and have a validatable style sheet.
(PS: some use "html","html*", and other constructs as well but not all
that fancy stuff works in all browsers.)
 
B

Bob

Neredbojias said:
To further the education of mankind said:
Not sure if you know this, but CRT monitors, when they get old, they get
really hard to view. They hurt your eyes. One of the things that goes is
the contrast. CRT monitors work via some kind of jets that shoot
something at the screen. After years, this jet substance starts to gum
up the screen in some way.

To answer you, I have been monkeying with contrast/brightness/gamma and
everything else on the monitor, video card, you name it, for months on
end now, and I have not been able to fix this problem no matter where I
set it to. The guys on the Linux group said the monitor is shot.

I've got a 10+ yr old NEC crt that's surely dimmed a bit but doesn't seem
to have the problem yours does. Anyway, I'm not contesting your
conclusion but will add that they sell screen filters for over-contrasty
monitors as well.
I am looking at a webpage that is using inline styles, to whit:

<span style="color: black;">

How do I change the style sheet to change these text strings to grey?
Will this do it?

span style {
color: #787878 !important;
}
Yes. ...I think.
I have it set to this now:

span[style] {
color: #787878 !important;
}

And it seems to be working.

Why not just:

span { color:#787878 !important; }

??

Also, this was probably already discussed, but you could:

body,span {
background:#383838 !important;

What color is that? White?
 
J

Jonathan N. Little

Ed said:
A very dark grey, nearly black. The keyword grey is more like #bebebe I
believe.

Dark? Yes. Black? No.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Color</title>
<style type="text/css">
BODY { background-color: #383838 }
P { background-color:#000; color: #fff; padding: 3em }
</style>
</head>
<body>
<p>Sample</p>
</body>
</html>
 
N

Neredbojias

To further the education of mankind, Neredbojias
I have it set to this now:

span[style] {
color: #787878 !important;
}

And it seems to be working.

Why not just:

span { color:#787878 !important; }

??

Also, this was probably already discussed, but you could:

body,span {
background:#383838 !important;
color:#787878 !important;
}

((Lost replies with this goddamn newsreader))

#383838 is off-black and can reduce contrast with mid-lumina text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top