|
Posted by Harlan Messinger on 11/01/06 21:02
richard wrote:
> Using "reserved" words as class or ID names is just not a good practice.
Where does the CSS specification designated any words as reserved?
> Since a color name is another way of stating the hex or decimal value,
> the interpretation of the use could result in things not wanted.
> For instance, "backgound-color:red", "background-color:#F00", and
> "background-color:RGB(255,0,0)" all say the same thing.
> Whereas using "ared" would not be misinterpreted, but even "reda" might be.
Untrue. Parsing isn't a matter of blind search-and-replace.
> I found this out years ago while learning to program in BASIC.
> Saves a lot of confusion if you simply add a character to the beginning
> of the reserved word. Not to the end.
Parsers are vastly more sophisticated now than they were in the days of
BASIC, and a CSS parser is not going to think
.red { color: red; }
means
.#F00 { color: #F00; }
Navigation:
[Reply to this message]
|