Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- languages and CSS


alt131 - 12:07 pm on Jun 16, 2012 (gmt 0)


ooooo.... this is fun.

I don't like spans because of the number of letters either, but lang is one scenario when it's hard to argue against them. Thankfully we italicis foreign words in the main text so I can use <i> with a clear conscience :)
p:lang(iu)
versus
p :lang(iu)but ooh, that looks iffy. Besides, sometimes I have consecutive lines and one of them's English.
Are you sure you have a paragraph then? A list, quotes, definitions .....?
Anyways, p:lang(iu) selects p's with the language attribute, p :lang(iu) catches children of p, so there should be a way to make it work. Something like:

<p>Single <i lang="iu">Inuktitut</i> word<br>
English<br>
<i lang="iu">Inuktitut line</i>
</p>
:lang(iu) {color:blue}
br + :lang(iu) {color:red}
... or whatever variation of nth-child/child will do it. If this is tables have you tried row/col grouping, and/or nth-child on the tr/td?

Whether there is a match is based solely on the identifier C being either equal to, or a hyphen-separated substring of, the element's language value, in the same way as if performed by the '|=' operator.
Drink more coffee and read the recs at 2am :)
:lang(C) works just like the |operator, so C could exactly equal the language value, (eg :lang(iu) exactly equals lang="iu")
Or, if you are using a hyphen-separated string (say fr-CA, for French spoken in Canada), then C will also match the language part (eg :lang(fr) matches lang="fr-CA" )
... couldn't use an Inuktitut example because it is the macro language. Off topic, but ISO 639 is suggesting ike (Inuktitut ) and ikt (Inuinnaqtun)for non-legacy uses ... and that iu is now iku ...
(Yes, a table is the most appropriate format, thank you for asking.)
Gosh ... as if anyone here would do that ;)


Thread source:: http://www.webmasterworld.com/css/4464166.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com