As attribute selectors are basically supported in every browser (except ie6), compatibillity isn't the issue here. Not entirely sure here, I guess working with classes is just what people are more used to?


On Sat, Nov 30, 2013 at 01:51:39PM +0200, Amir E. Aharoni wrote:
That is, more or less, the reason why W3C recommends using <em> rather than
<i>. Ideally the ''double apostrophe'' in wiki-syntax will insert <em> (now it
inserts <i>), and we'll have styling somewhere along these lines:

.script-latn em {
    font-style: italic;

.script-hebr em {
    font-weight: bold;

(Of course, this is just a simplistic suggestion and the actual styling may be
I know this was just an illustrative example, but I'm curious
whether there's any reason not to use the :lang css construct for
cases like this (rather than e.g. .script-hebr)?

So you'd set <body lang="hebr">, then use rules like:
:lang(hebr) em {
    font-weight: bold;

I'm just checking that there's no good reason not to use this,
because that's what I've been doing with an extension I wrote[0] ;)



Design mailing list