Template talk:Highlight
| Template:Highlight is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Default date qualifier
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ςcopia◁galaxies 18:21, 8 June 2010 (UTC)
- Okay done.
{{hilite|text|color|expiry date}}
- Neato, thank you! Now my questions are:
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.)Should the expiry date be optional as well?- 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ςcopia◁galaxies 23:13, 8 June 2010 (UTC)
- Fixed yellow bit (proud of myself!), and I linked to the wrong discussion anyway, oi. – Kerαunoςcopia◁galaxies 23:34, 8 June 2010 (UTC)
- Neato, thank you! Now my questions are:
- Okay, I'm seeing it... "if expression", so the expiry date is optional then. – Kerαunoςcopia◁galaxies 23:36, 8 June 2010 (UTC)
- 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ςcopia◁galaxies 23:44, 8 June 2010 (UTC)
- 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ςcopia◁galaxies 23:54, 8 June 2010 (UTC)
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ςcopia◁galaxies 00:07, 9 June 2010 (UTC)
- 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)
- Ah, okay. Absolutely wonderful, thank you so much for taking the time to do this. – Kerαunoςcopia◁galaxies 00:33, 9 June 2010 (UTC)
mark
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."
| Markup | Renders 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)
Semi-protected edit request on 28 April 2015
This edit request to Template:Hilite has been answered. Set the |answered= parameter to no to reactivate your request. |
Samuelcala (talk) 23:29, 28 April 2015 (UTC)
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)
Requested move 18 December 2015
- 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)
Template:Hilite → Template:Highlight – The correct spelling is "Highlight". GeoffreyT2000 (talk) 00:37, 18 December 2015 (UTC)
- 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
This edit request to Template:Highlight/core has been answered. Set the |answered= parameter to no to reactivate your request. |
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)
Template-protected edit request on 17 July 2026
This edit request to Template:Highlight/core has been answered. Set the |answered= parameter to no to reactivate your request. |
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)
- 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)- 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)
- 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)
- 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)
- 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)
- 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
andonly 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)- 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)
- 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)
- I'm very confused, I tried different browsers and changes are visible in every one of them (Chrome, Firefox, Edge), maybe a screenshot of Template:Highlight/testcases page will help you notice, I see this:

- Is the page looks different on your end? IamNikita (talk) 02:51, 3 August 2026 (UTC)
- I see the difference in your screen shot. I use the Chrome browser and I edit with the 2010 Vector Legacy skin. I went through the other skins on the test cases page, and I saw the difference only in the MinervaNeue skin. There were no differences seen using any of the other skins. I'm sorry but I still don't see this as a significant improvement. P.I. Ellsworth , ed. – welcome! – 09:55, 3 August 2026 (UTC)
- "2010 Vector Legacy" doesn't support dark mode, I can't do anything about it.
- How do you measure significance? Vast majority of people use default theme which according to Vector 2022 on desktop and Minerva Neue on mobile. You say you see changes in Minerva Neue, do you see it in Vector 2022?
- I just want to read this website with dark mode without hacks, you are the second person I encounter trying to change things, first was about reporting issue, now I propose changes but I got the same dissmissive comments, this is very frustrating experience. IamNikita (talk) 12:57, 3 August 2026 (UTC)
- I measure significance in several ways. One way is accuracy. Your screenshot just shows the instance where no highlight color is defined. One problem with this edit is that it also changes when "yellow highlighting" is defined. And I find it inaccurate to define the highlighting as yellow and then see a dark brown color in the background. So even when I saw a difference (in the MinervaNeue skin only) the highlighting color that had been set to yellow was very different from yellow. In fact I see yellow text instead of yellow background. It's very confusing. Please get a consensus before reopening this edit request. P.I. Ellsworth , ed. – welcome! – 06:34, 4 August 2026 (UTC)
- You are constantly moving goalposts. First version was rejected because "I'm not seeing any difference", second version was rejected for mutually exclusive chain of reasons:
- 1) "If your edit is not an improvement to the yellow visual, then what does it improve exactly"
- 2) "One problem with this edit is that it also changes when "yellow highlighting" is defined"
- If I remove remapping of the yellow color (even though this is how other templates do this kind of stuff instead of edits a lot of pages that were written for light mode) we will end up doing the full circle?
- I'm not trying to force you to use dark mode and I don't want to waste my time convincing people who don't use dark mode that it needs fixes. I can just continue to use custom themes and now Dark Reader like I'm doing for more than a decade. I would be very glad if you can point me where I can find people interested in fixing this website dark theme (and preferably using it too). IamNikita (talk) 09:10, 4 August 2026 (UTC)
- Sorry that you seem frustrated, which is understandable. I've just tried to be honest with you. And while I don't use DM myself, I do know how to use it, and when I do use it to check edit requests, my color-blindness is zero. I suggest that you start a new section and garner consensus for your edits to go forward. We are all volunteer editors, and it will help to know what other editors think about these changes. Thank you and Best to you! P.I. Ellsworth , ed. – welcome! – 10:51, 4 August 2026 (UTC)
- I measure significance in several ways. One way is accuracy. Your screenshot just shows the instance where no highlight color is defined. One problem with this edit is that it also changes when "yellow highlighting" is defined. And I find it inaccurate to define the highlighting as yellow and then see a dark brown color in the background. So even when I saw a difference (in the MinervaNeue skin only) the highlighting color that had been set to yellow was very different from yellow. In fact I see yellow text instead of yellow background. It's very confusing. Please get a consensus before reopening this edit request. P.I. Ellsworth , ed. – welcome! – 06:34, 4 August 2026 (UTC)
- I see the difference in your screen shot. I use the Chrome browser and I edit with the 2010 Vector Legacy skin. I went through the other skins on the test cases page, and I saw the difference only in the MinervaNeue skin. There were no differences seen using any of the other skins. I'm sorry but I still don't see this as a significant improvement. P.I. Ellsworth , ed. – welcome! – 09:55, 3 August 2026 (UTC)
- 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)
- 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
- 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)
- 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)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.