Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: alternate way? Date: Tue, 4 Aug 2020 04:38:39 +0200 Lines: 27 Message-ID: References: <1j5tkprrh925z$.1olio0ank8ocm$.dlg@40tude.net> <548c1bdc-2de3-4911-8412-c0244e5725d9n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net ut3xGwbtJzWWJITpiHKUnwNkwuXEnr+c3tplRVxRcBEautSj/f Cancel-Lock: sha1:7mO1uxVP8FK1vUsTED9EGg8hQJQ= In-Reply-To: <548c1bdc-2de3-4911-8412-c0244e5725d9n@googlegroups.com> Xref: csiph.com comp.lang.javascript:38634 Michael Haufe (TNO): > On Saturday, July 25, 2020 at 8:06:08 AM UTC-5, JJ wrote: >> On Fri, 24 Jul 2020 12:21:03 -0700, Robert Baer wrote: >>> JJ wrote: >>>> >>>> If you're trying to highlight words from a given keyword, scroll the >>>> matching keyword into view, it has to be done manually via JS to mimic the >>>> browser's Find feature. >>>> >>> So...even using CSS as a helper, i am SOL? >> You can, but keep in mind that CSS can only be applied to elements. Not >> text. So, if you want to highlight a word which is part of a text in a text >> node, that word must be enclosed within an element first, before you can >> actually style it. > > Not true in the modern day: > > CSS will only be applied to the text which *is* *selected* and not *to* select it. -- Arno Welzel https://arnowelzel.de