![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings. Is it possible using HTML and CSS to represent a combining diacritical mark in a different style from the letter it modifies? For example, say I want to render Å‘ (Latin small letter o with a double acute accent), but with the o in black and the double acute accent in green. Are either of the following valid? 1. <span style="color: black;">o</span><span style="color: green;">̋</span 2. <span style="color: black;">o<span style="color: green;">̋</span></span Neither of the two browsers I tested (SeaMonkey 1.1.6 and Konqueror 3.5.8, both on GNU/Linux) render the examples as intended. Is there some part of the HTML, CSS, or Unicode standards which says that combining diacritical marks can't be styled independently, or are my browsers buggy? Regards, Tristan |
#3
| ||||
| ||||
|
|
Is it possible using HTML and CSS to represent a combining diacritical mark in a different style from the letter it modifies? |
|
For example, say I want to render o (Latin small letter o with a double acute accent), but with the o in black and the double acute accent in green. Are either of the following valid? 1. <span style="color: black;">o</span><span style="color: green;">̋</span 2. <span style="color: black;">o<span style="color: green;">̋</span></span |
|
Neither of the two browsers I tested (SeaMonkey 1.1.6 and Konqueror 3.5.8, both on GNU/Linux) render the examples as intended. |
|
Is there some part of the HTML, CSS, or Unicode standards which says that combining diacritical marks can't be styled independently, or are my browsers buggy? |
#4
| |||
| |||
|
|
And if you do process combining diacritic marks by Unicode rules, then o with double acute is to be treated as compatibility equivalent to the single character U+0151 (Latin small letter o with double acute). In general, programs should not be expected to treat compatibility equivalent characters differently; they may do so, but they are surely not required to do so. In particular, a browser may well internally map the combination to U+0151 at the character level. It's nothing that complicated, though. They probably just ignore the styles you set for a combining diacritic mark. |
|
You're not the first one to ask for the feature. It has been discussed at length in the Unicode mailing list. See e.g. the discussion "Coloured diacritics", http://www.unicode.org/mail-arch/uni...-m12/0379.html |

|
The bottom line is that no, you can't expect to be able to do such things. |
#5
| |||
| |||
|
|
In general, the mark is actually part of the character and not separate. That is, an "ñ" is not merely an "n" with a tilde. Instead, it's quite distinct (at least in Spanish) from an "n". |
|
Thus, having separate colors would be inappropriate. |
|
What you want would be the same as having an "i" with the dot a different color than the stroke or having an "A" withe the cross-bar a different color than the two diagonals. |
#6
| |||
| |||
|
| http://www.unicode.org/mail-arch/uni...-m12/0379.html That page is password-protected. ![]() |
|
The bottom line is that no, you can't expect to be able to do such things. I suspected as much, but (except in the case of compatibility equivalent characters) you haven't provided any normative reason for this. |
|
Are you saying that this "bottom line" is simply an implementation choice? |
#7
| |||
| |||
|
|
Is it possible using HTML and CSS to represent a combining diacritical mark in a different style from the letter it modifies? |
![]() |
| Thread Tools | |
| Display Modes | |
| |