![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| ||||||
| ||||||
|
|
The underline character in identifiers has been added in CSS 2.1. |
|
Interestingly, it has been removed again in CSS3 (Syntax). |
|
However, neither has achieved the status of Recommendation yet, so it seems to be good practice to not use the underline character. |
|
color: #000000; Besides, the value should be independent on color depth: #000 |
|
background-color: #ffdd77; This requires a color depth of at least 65536 (64k) to be properly displayed |
|
(and, therefore, serve as background for legible text). Try to stick to Real Websafe[tm] color values using |
#2
| ||||||||||||||
| ||||||||||||||
|
|
Thomas 'PointedEars' Lahn <PointedEars (AT) web (DOT) de> wrote: The underline character in identifiers has been added in CSS 2.1. It is considered an error in the CSS 2.0 spec corrected in the errata: http://www.w3.org/Style/css2-updates...12-errata.html |
|
This document is currently not maintained. The CSS working group is developing CSS 2.1. When features common to CSS2 and CSS 2.1 are defined differently, please consider the definition in CSS 2.1 as errata for CSS2. While CSS 2.1 is still a Working Draft, the errata are to be considered proposed errata. |
|
Interestingly, it has been removed again in CSS3 (Syntax). It hasn't: http://www.w3.org/TR/2003/WD-css3-sy...13/#characters |
|
class : '.' IDENT ; [...] nmstart [a-z]|{nonascii}|{escape} nmchar [a-z0-9-]|{nonascii}|{escape} ident [-]?{nmstart}{nmchar}* |
|
This document is a draft of one of the modules of CSS Level 3 (CSS3). Some parts of the document are derived from the CSS Level 1 and CSS Level 2 recommendations, and those parts are thus relatively stable. However, it is otherwise an early draft, and considerable revision is expected in later drafts, especially in formalization of error handling behavior, the conformance requirements for partial implementations (given the modularization of CSS3), and integration with other CSS3 modules. [...] This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ other than work in progress. Its publication does not imply endorsement by ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the W3C membership or the CSS & FP Working Group (members only). |
|
Even if it were, there is no version sniffing in CSS, thus the backward compatibility requirement means that UAs must continue to support it. |
|
However,neither has achieved the status of Recommendation yet, so it seems to be good practice to not use the underline character. The only possible reasons to avoid it is that a few obsolete browsers do not support it, and it must not be used as the first character of a class name. |
|
color: #000000; Besides, the value should be independent on color depth: #000 For this particular value #000 resolves to #000000, there is no difference. |
|
The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display. background-color: #ffdd77; This requires a color depth of at least 65536 (64k) to be properly displayed A browser with a lesser colour capability gamma corrects such a value to a supported value. |
|
The only scenario where it could conceivably result in difficulties is when an author codes foreground and background values of insufficient contrast. |
|
(and, therefore, serve as background for legible text). Try to stick to Real Websafe[tm] color values using This is antiquated advice, |
|
very few devices only support "web safe" colours, |
|
those that do for example also cannot handle jpegs properly, not something to care about. |
|
Furthermore, dedicated devices that only support "web safe" colours are unlikely to support CSS in the first place. |
![]() |
| Thread Tools | |
| Display Modes | |
| |