473,698 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Puzzled by CSS Validator error on color mnemonic

When doing a final check on my stylesheets the CSS Validator flag lines
like this one as an error:
ADDRESS A { color: gold; }

Error is:
# Line: 31 Context : ADDRESS A

Invalid number : colorgold is not a color value : gold

Strangely if I change the style sheet to:
ADDRESS A { color: #FFD700; }

There is not error but gold==#FFD700, it is a valid color mnemonic, also
all the 'color: gold' entries where flagged but not when in a border
definition like:
..boxed { border: thin solid gold; }

nor with other colors like:
H1 { color: white; }?

I guess I can use #FFD700, but gold would be easier to recognize...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 21 '05 #1
7 3352
Jonathan N. Little wrote:

[snip]
There is not error but gold==#FFD700, it is a valid color mnemonic,
No it isn't. The color keywords are specified in section 4.3.6 -
Colors of the specification
(<URL:http://www.w3.org/TR/REC-CSS2/syndata.html#co lor-units>).
all the 'color: gold' entries where flagged but not when in a
border definition like:
..boxed { border: thin solid gold; }
It's feasible that a previous error masked that one. I trust that one
of the two leading periods was a typo.
nor with other colors like: H1 { color: white; }?
That's because white is a valid keyword.
I guess I can use #FFD700, but gold would be easier to recognize...


You'll just have to manage.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #2
Jonathan N. Little wrote:
When doing a final check on my stylesheets the CSS Validator flag lines
like this one as an error:
ADDRESS A { color: gold; }

Error is:
# Line: 31 Context : ADDRESS A

Invalid number : colorgold is not a color value : gold
Correct. Check again; gold is not a valid color value.

Strangely if I change the style sheet to:
ADDRESS A { color: #FFD700; }
Not strangely, #ffd700 is a valid color.

There is not error but gold==#FFD700, it is a valid color mnemonic, also
all the 'color: gold' entries where flagged but not when in a border
definition like:
.boxed { border: thin solid gold; }
If that did not generate an error, you got unlucky in it not being
pointed out. Gold is NOT a valid color value.

nor with other colors like:
H1 { color: white; }?
Of course it worked. White is one of the 16 valid color name/values.

I guess I can use #FFD700, but gold would be easier to recognize...


Perhaps a comment in your CSS file? You're stuck with #ffd700 since
gold is not valid.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein
Jul 21 '05 #3
Michael Winter wrote:
Jonathan N. Little wrote:

[snip]
There is not error but gold==#FFD700, it is a valid color mnemonic,

No it isn't. The color keywords are specified in section 4.3.6 -
Colors of the specification
(<URL:http://www.w3.org/TR/REC-CSS2/syndata.html#co lor-units>)

Dang, you are correct! All the years, either it's senility setting in or
I am confusing it back with old Netscape browser spec ;-)
..
all the 'color: gold' entries where flagged but not when in a
border definition like:
> ..boxed { border: thin solid gold; }


Not in my code! Mine only has one '.'
It's feasible that a previous error masked that one. I trust that one
of the two leading periods was a typo.
nor with other colors like: H1 { color: white; }?

That's because white is a valid keyword.
I guess I can use #FFD700, but gold would be easier to recognize...

You'll just have to manage.

Mike

Thanks, Yes I'll manage, I'll just have to review the spec and commit
the color names to memory!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 21 '05 #4
Uncle Pirate wrote:
Jonathan N. Little wrote:
When doing a final check on my stylesheets the CSS Validator flag
lines like this one as an error:
ADDRESS A { color: gold; }

Error is:
# Line: 31 Context : ADDRESS A

Invalid number : colorgold is not a color value : gold

Correct. Check again; gold is not a valid color value.


Yep, thanks as in my other message I think I am confusing CSS color
names with old Netscape pre-CSS color names. Sometimes it is hard to
'unlearn' thins. I usually have no problem understanding hex color
values, maybe I'll just stick with them!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 21 '05 #5
*Jonathan N. Little* <lw*****@centra lva.net>:
# Line: 31 Context : ADDRESS A

Invalid number : colorgold is not a color value : gold
(It's unbelievable that they still haven't put a space in there at the
obvious position. Nor deleted the ones before the colons.)
ADDRESS A { color: #FFD700; }
.... or "rgb(255, 215, 0)" or "rgb(100%, 84%, 0%)".
There is not error but gold==#FFD700, it is a valid color mnemonic,
Says who? Where do people learn this rubbish?
I can understand when someone is experimenting with color names and finds
'gold' to look somehow golden in some browsers, but I do not understand
expecting such a specific value.
all the 'color: gold' entries where flagged but not when in a border
definition like:
.boxed { border: thin solid gold; }
May be a bug in the CSS checker, but could be for another reason, too.
I guess I can use #FFD700, but gold would be easier to recognize...


The sad thing is, the stupid list of X11 color names was incorporated into
SVG and will thus almost for sure be included into CSS*3: Color. It holds
true: what comes from SVG or XSL into CSS is seldomly well designed.

--
The Hitchhiker's Guide to the Galaxy: "To summarize: It is a well-known fact
that those people who must want to rule people are, ipso facto, those least
suited to do it. To summarize the summary: Anyone capable of getting themselves
made President should by no means be allowed to do the job. To summarize the
summary of the summary: People are a problem."
Jul 21 '05 #6
On Wed, 02 Feb 2005 21:13:44 +0100, Christoph Paeper
<ch************ **@nurfuerspam. de> wrote:

...
The sad thing is, the stupid list of X11 color names was incorporated
into SVG and will thus almost for sure be included into CSS*3: Color. It
holds true: what comes from SVG or XSL into CSS is seldomly well
designed.


What's the problem, apart from most of the names being silly? Browsers
already support all the X11 color names, in CSS as well as in HTML
attributes.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen

Jul 21 '05 #7
*Rijk van Geijtenbeek* <ri**@operaremo vethiz.com>:
On Wed, 02 Feb 2005 21:13:44 +0100, Christoph Paeper
The sad thing is, the stupid list of X11 color names was incorporated
into SVG and will thus almost for sure be included into CSS*3: Color.
It holds true: what comes from SVG or XSL into CSS is seldomly well
designed.
What's the problem, apart from most of the names being silly?


That's the basic problem. They are partly strangely named and neither
systematic nor logic: 'darkgray', for example, is lighter than 'gray', but
at least darker than 'lightgrey'---SVG/CSS adds the missing gray/grey
variants, but we probably will never get 'colour' OTOH. What's worse:
their existence effectively hinders the introduction of a better system,
which deserves to be called one. I liked
<http://lists.w3.org/Archives/Public/www-style/2002May/0201.html>; WD2 of
the color module was published 19 Feb 2002, i.e. over three months
earlier, and already had the X11 (later: SVG) color keywords, but could
have been changed for the better still---now it's been a CR for over one
and a half year.
Browsers already support all the X11 color names, in CSS as well as in
HTML attributes.


Opera, for instance, does not in all circumstances.

--
Reality is an illusion that occurs due to the lack of alcohol.
Jul 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
7415
by: Spartanicus | last post by:
The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm uses a custom DTD, the w3c validator validates it but with this warning: "Unknown Parse Mode! The MIME Media Type (text/html) for this document is used to serve both SGML and XML based documents, and it is not possible to disambiguate it based on the DOCTYPE Declaration in your document. Parsing will continue in SGML mode."...
0
1715
by: Valerie Hough | last post by:
I have derived a class from MenuItem so that I can associate IDs of my choosing with each item (a la C++). I have created a ContextMenu in the constructor of an owner draw list box and added a number of MyMenuItems to it, each with a unique mnemonic (&Item1 e.g.). When I right click the mouse on my list box, all the menus show up as intended; the characters I have assigned as mnemonics work, but the mnemonic character is not...
8
7829
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the VALUE ENTERED BY THE USER EXISTS IN THE DB , then THE ERROR MESSAGE OF THE COMPARE VALIDATOR SHOULD BE DISPLAYED. For this, I used the reference artiicle "http://msdn.microsoft.com/library/default.asp?url=/library/en-...
1
1485
by: bennett | last post by:
At http://www.brainjammer.com/testing/validator_test.aspx I have a text field where you can enter text, and a button where if you click the button, it sets the value of a label below it, to display the text you entered in a text field. There is also a RequiredFieldValidator for the text field so that you get an error if you leave it blank. As long as I have EnableClientScript set to true for the RequiredFieldValidator, if I leave the...
3
1294
by: tshad | last post by:
I have a page that is very long so I have set it up to page using <div> to display or hide the different pages. When I get to the last page the user submits the page. This works great, except that if one of the validators finds an error and it isn't on the last page, the user won't see it. What I want to do is know that there is an error on the 2nd page and make that page visible (which would show the validator error message) and the...
40
5594
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic HTML page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html401/strict.dtd"> <html> <head>
5
1361
by: intrader | last post by:
The code is: <code> namespace ConsoleApp { public interface Ivalidator{ String ErrorMessage{get;} Boolean IsValid{get;} void Validate(string value,long mask, long maxLength,string dispName,string sExtra); }
60
3842
by: aarklon | last post by:
Hi all, Is there any mnemonic for remembering C precedence rules???? I have just coined the word TUBSREBLCAC where T --- top level operators U ---- unary operators B ----- binary operators S ------ shift operators
39
3289
by: jacob navia | last post by:
Mnemonic means trying to remember. Mnemonic means making annotations that remind you. Speaking about mnemonic I saw this message. Tor Rustad wrote: One of the problems with old people is that they tend to live in the past.
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7721
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.