Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2396194ba8d51a8

Jump to content

Template talk:Highlight

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 1 day ago by Paine Ellsworth in topic Template-protected edit request on 17 July 2026

Default date qualifier

[edit]

Otheus (talk · contribs) created this neat template a few years ago and left, I suppose, a note to self to "Add default date qualifier -- if it's after so many days, the hilite goes away" within the edit window. I thought this was a great idea; Otheus hasn't been active in a while, so if anyone is watching this page, would anyone know the code to create a date qualifier? – Kerαunoςcopiagalaxies 18:21, 8 June 2010 (UTC)Reply

Okay done.
{{hilite|text|color|expiry date}}
Gary King (talk) 22:39, 8 June 2010 (UTC)Reply
Neato, thank you! Now my questions are:
  1. Is it possible to make it so that if no color is specified (like the original template was), yellow becomes the default? (The template is being used at, for example, Wikipedia:Help_desk#General_of_Division_Aristide_Razu, but now no coloring appears.)
  2. Should the expiry date be optional as well?
  3. What exactly is the expiry date function supposed to be written as? I tried "1" thinking it would disappear after one day, but that didn't seem to work. I tried deciphering the code, but my knowledge on template coding is pretty limited.
Kerαunoςcopiagalaxies 23:13, 8 June 2010 (UTC)Reply
Fixed yellow bit (proud of myself!), and I linked to the wrong discussion anyway, oi. – Kerαunoςcopiagalaxies 23:34, 8 June 2010 (UTC)Reply
Okay, I'm seeing it... "if expression", so the expiry date is optional then. – Kerαunoςcopiagalaxies 23:36, 8 June 2010 (UTC)Reply
Hmm... I also found the /core page. I'm using Wikipedia:Help_desk#article_about_General_Aristide_Razu_deleted.3F as the test discussion (correct link). If I add "yellow" to parameter 2, the highlighting returns, but without the "yellow", the highlighting disappears. Maybe /core isn't needed then? – Kerαunoςcopiagalaxies 23:44, 8 June 2010 (UTC)Reply
Okay, nevermind. I removed the "/core" from the code just to try it: adding {{hilite|foo}} on the main page still worked, but the link above showed a "Template:Loop error detected" (or similar). So... reverted my edits. I guess now I'm not understanding why /core is required, but "yellow" still needs to be added. – Kerαunoςcopiagalaxies 23:54, 8 June 2010 (UTC)Reply

Wow so confused. Changing the font color on /core to red, my sandbox {{hilite}} had red font, but the above link didn't, even after reloading the page. Mysteries. – Kerαunoςcopiagalaxies 00:07, 9 June 2010 (UTC)Reply

You need to purge the page that you're using the template on after changing the template to see the new changes. Also, I added template documentation with examples. Gary King (talk) 00:22, 9 June 2010 (UTC)Reply
Ah, okay. Absolutely wonderful, thank you so much for taking the time to do this. – Kerαunoςcopiagalaxies 00:33, 9 June 2010 (UTC)Reply

mark

[edit]

Should we update from <span> to <mark> which "represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context."

MarkupRenders as
<mark>HyperText Markup Language</mark>

HyperText Markup Language

<mark style="background:lightblue">HyperText Markup Language</mark>

HyperText Markup Language

-- Gadget850 (Ed) talk 19:17, 29 December 2012 (UTC)Reply

Semi-protected edit request on 28 April 2015

[edit]

Samuelcala (talk) 23:29, 28 April 2015 (UTC)Reply

 Not done as you have not requested a change. Please mention the specific changes in a "change X to Y" format. --I am k6ka Talk to me! See what I have done 23:39, 28 April 2015 (UTC)Reply

Requested move 18 December 2015

[edit]
The following is a closed discussion of the proposal. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The result of the proposal was move per request. Certainly the vastly more common spelling and thus more likely for users to immediately grok what the template's function might be. Because it is unclear whether the existing and redirected template at the target title was partially merged here, I will do a history swap.--Fuhghettaboutit (talk) 20:22, 27 December 2015 (UTC)Reply


Template:HiliteTemplate:Highlight – The correct spelling is "Highlight". GeoffreyT2000 (talk) 00:37, 18 December 2015 (UTC)Reply

The above discussion is preserved as an archive of the proposal. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Template-protected edit request on 23 June 2025 Suggestion for Template:Highlight/core

[edit]
—⁠andrybak (talk) 20:30, 23 June 2025 (UTC)

The "span" should be replaced with "mark" for semantic HTML purposes. The appearance will not change, but editors using a screen reader configured to sound out semantic attributes will be made aware of what is happening. Artoria2e5 🌉 08:44, 23 June 2025 (UTC)Reply

 Donexaosflux Talk 12:26, 26 June 2025 (UTC)Reply

Template-protected edit request on 17 July 2026

[edit]

For stylizing purposes (to be able to solve issues in dark mode, which for example were reported here) move styles into Template:Highlight/core/style.css stylesheet by creating it with next content:

.text-highlight { color: black; background: yellow; }

and change this template by substituting

style="color:black;background:{{{2|yellow}}}"

with

class="text-highlight" {{#if:{{{2|}}}|style="background:{{{2|}}}"}} }}

IamNikita (talk) 21:50, 17 July 2026 (UTC)Reply

Using style="background:{{{2|}}}" without a specified color will cause a Linter error. Please revise the code, putting it in Template:Highlight/sandbox for testing at Template:Highlight/testcases. – Jonesey95 (talk) 22:11, 17 July 2026 (UTC)Reply
To editor Jonesey95: not sure what issues in dark mode the requestor is up against, but I'm not seeing any difference on the [test cases] page, light or dark mode. I think I've done this right; you might want to double check it. I created Template:Highlight/core/sandbox/style.css and Template:Highlight/core/sandbox, then I altered Template:Highlight/sandbox to use the /core/sandbox. If I've done this right, and you also don't see a difference, then maybe editor IamNikita can add test cases that show their issues/problems/challenges they're having? P.I. Ellsworth, ed.  welcome!  07:30, 19 July 2026 (UTC)Reply
I agree that the testcases page looks good in both light and dark mode. I have marked this request as answered pending feedback from the requester. – Jonesey95 (talk) 13:25, 19 July 2026 (UTC)Reply
Thank you for checking! I see the **Linter error** thrown by Template:Highlight/sandbox in the "Page information". We certainly don't wanna make that a permanent thing! P.I. Ellsworth, ed.  welcome!  14:19, 19 July 2026 (UTC)Reply
Sorry, I didn't see a response, I wasn't subscribed for the thread for some unknown reason.
The proposed change doesn't change any visuals because it wasn't supposed to. I wanted the change to be as less opinionated as possible, only to prepare technical side of things. The lint error already exists, isn't it? It's also a false-positive with the change I proposed because we set default text color in css.
Anyway, I made the changes to be functional, Template:Highlight/testcases now shows changes for empty and yellow color parameters in dark mode. The yellow replacement background color in Codex seems to be too dim, I've used a search highlight color from a dark theme of an IDE I have installed, it looks dimmer then I would like but it has very high contrast ratio (passes WCAG AAA). Linter issue also should be fixed. IamNikita (talk) 21:46, 19 July 2026 (UTC)Reply
To editor IamNikita: sorry for moving slowly, I've been very busy with offline medical concerns. Thank you for fixing the lint error! I'm still a little confused by The proposed change doesn't change any visuals and only to prepare technical side of things. What does that mean? If your edit is not an improvement to the yellow visual, then what does it improve exactly? P.I. Ellsworth, ed.  welcome!  14:08, 24 July 2026 (UTC)Reply
You've missed last paragraph of the message.
Wish you quick recovery. I'm also sorry for late reply, busy with some other stuff. IamNikita (talk) 21:38, 27 July 2026 (UTC)Reply
Thank you very much for your good wishes! And sorry, I did not miss the last paragraph of the message. It's just that I don't understand, for example, you say the changes are functional, that the test cases page now shows changes for empty and yellow color parameters in dark mode. But I don't see those changes. I cannot sanction what I cannot see. Perhaps another template editor will be able to see the changes and approve them? P.I. Ellsworth, ed.  welcome!  04:43, 29 July 2026 (UTC)Reply