Prev: Can I refer width value not to the parent container cascade but to the current top browser window?
Next: b or strong?
From: Karsten Wutzke on 4 Feb 2010 17:15 Hello, does CSS have a selector that allows the selection of content? I want to syntax highlight specific keywords in my pre and code tags, ideally operators, numerics, strings, and comments, too. The "classic" CSS only way to do so seems to be to use spans all over the place. But, this can become very unhandy at some point. The text is very hard to read from the HTML code. Is there such a selector? Am I basically stuck to use spans? Note, I don't want to use JavaScript or any other techniques, just plain HTML/ CSS. Karsten
From: dorayme on 4 Feb 2010 17:37 In article <ef01ebd2-06c5-43ff-9b4c-18e7cdef3f25(a)u41g2000yqe.googlegroups.co m>, Karsten Wutzke <kwutzke(a)web.de> wrote: > does CSS have a selector that allows the selection of content? I want > to syntax highlight specific keywords in my pre and code tags, ideally > operators, numerics, strings, and comments, too. No. -- dorayme
From: Karsten Wutzke on 4 Feb 2010 18:49 On 4 Feb., 23:37, dorayme <doraymeRidT...(a)optusnet.com.au> wrote: > In article > <ef01ebd2-06c5-43ff-9b4c-18e7cdef3...(a)u41g2000yqe.googlegroups.co > m>, > Karsten Wutzke <kwut...(a)web.de> wrote: > > > does CSS have a selector that allows the selection of content? I want > > to syntax highlight specific keywords in my pre and code tags, ideally > > operators, numerics, strings, and comments, too. > > No. > > -- > dorayme :-) I love concise answers. So using spans is the only pure HTML/CSS way to go? Thanks Karsten
From: Nik Coughlin on 4 Feb 2010 19:13 On 5/02/2010 12:49 pm, Karsten Wutzke wrote: > On 4 Feb., 23:37, dorayme<doraymeRidT...(a)optusnet.com.au> wrote: >> In article >> <ef01ebd2-06c5-43ff-9b4c-18e7cdef3...(a)u41g2000yqe.googlegroups.co >> m>, >> Karsten Wutzke<kwut...(a)web.de> wrote: >> >>> does CSS have a selector that allows the selection of content? I want >>> to syntax highlight specific keywords in my pre and code tags, ideally >>> operators, numerics, strings, and comments, too. >> >> No. > > :-) I love concise answers. > > So using spans is the only pure HTML/CSS way to go? Yes.
From: Johannes Koch on 5 Feb 2010 04:00
Nik Coughlin schrieb: > On 5/02/2010 12:49 pm, Karsten Wutzke wrote: >> So using spans is the only pure HTML/CSS way to go? > > Yes. Or use another element type if there is a more appropriate one. -- Johannes Koch In te domine speravi; non confundar in aeternum. (Te Deum, 4th cent.) |