Page MenuHomePhabricator

Find a better way to highligth letters then bold
Open, NormalPublic

Description

I just realized, that bold ( and italic ) is currently the default for the small letters on multiple references on en.WP. So making them bold to highlight them seems not to work there.

See e.g.: https://en.wikipedia.org/wiki/Nico_Ditch#cite_note-N_92_83-4

Event Timeline

WMDE-Fisch triaged this task as Normal priority.
Restricted Application added a project: Design. · View Herald TranscriptNov 23 2018, 1:36 PM

I played around with a few styling options. The little "b" is what is relevant in the following examples.

.mw-cite-backlink a sup {
    padding: 0 0.3em;
}
.mw-cite-backlink a:target sup {
    background: rgba(0, 110, 255, 0.3);
    text-shadow: 0 0 1px #fff;
}

The idea is to apply the padding to all these small letters (they are barely clickable with the mouse anyway), and add the color to the relevant one.

Or a little more extreme:

Izno moved this task from Unsorted backlog to External on the Cite board.Dec 8 2018, 12:31 AM

Adding some user feedback:

"So will it be just bold or also marked with some class so that ppl can customise it to their like? (Including making use of it even if all marks are bold anyway)"
(source)

There is already a class:

:target .mw-cite-targeted-backlink {
	/* customizations go here */
}

However, I would not (yet) advertise this – only after we finalized our styling.

Alsee added a subscriber: Alsee.EditedApr 18 2019, 12:40 AM

Don't add any extra padding on the letters, except perhaps on the single letter being highlighted.

The community has long and repeatedly objected to added whitespace in various places. Some lists and tables have massively repeated use of particular refs, and adding the proposed padding would badly inflate long backlink lists. Offhand I know of specific articles with upwards of fifty backlinks on a ref, and there are surely cases of refs with a few hundred backlinks. (EnWiki explicitly has support for backlinks running up to azz, which would be over 1400. I don't know how much of that range we actually use.)

Thanks a lot for bringing this up! This is certainly a very relevant issue with the idea I presented above. Applying the padding only on one character is a neat idea. The one issue with this approach is that it causes a reflow every time the padding appears and disappears. But this might be acceptable.

Another idea I just had is to intentionally repeat the up-arrow:

.mw-cite-backlink a:target sup {
    background: #2a4b8d;
    border-radius: 2px;
    color: #fff;
    padding: 0.1em 0.3em;
}
.mw-cite-backlink a:target sup:before {
    content: "^";
    padding: 0 0.1em;
}

No decision is made yet, and this task not yet picked up to be worked on. So far this is just me playing around.

Alsee added a comment.Apr 27 2019, 7:35 PM

Oh yeah, I forgot reflow. Most cases would be negligible, but hitting an uncommon big reflow might be unpleasant. I think it would probably be better to just apply the darkened background to the relevant backlink, without changing the size of anything. Is there anything holding back a styling change?

I was considering opening a discussion on EnWiki to remove the bolding from our backlinks, so the current feature would work. It's a pretty neat feature, I wanted to get it working on EnWiki too. Although I'm not sure if it's worthwhile to change EnWiki, if the global backlink styling might be changed some time soon. Should I assume this will be stalled for a while and just go ahead and open the EnWiki discussion?

I was considering opening a discussion on EnWiki to remove the bolding from our backlinks, so the current feature would work. It's a pretty neat feature, I wanted to get it working on EnWiki too. Although I'm not sure if it's worthwhile to change EnWiki, if the global backlink styling might be changed some time soon. Should I assume this will be stalled for a while and just go ahead and open the EnWiki discussion?

If I'm not mistaken the default is to not have bolding on the backlinks (but en-wiki is not the only wiki who added it, we know at least of zh, ar and es who also bold them). In my opinion it would be great if wikis were changing to unbold characters, otherwise we would just be loading more and more styling on top of each other on the wiki pages.
As of now, there is no concrete plan to pick this up soon. I'd be super happy to see a discussion on en-wiki.

If I'm not mistaken the default is to not have bolding on the backlinks (but en-wiki is not the only wiki who added it, we know at least of zh, ar and es who also bold them). In my opinion it would be great if wikis were changing to unbold characters, otherwise we would just be loading more and more styling on top of each other on the wiki pages.

Just to back this up:

Yes. the global default for backlinks is not bold. So bold backlinks are local overwrites by the wikis using the MediaWiki namespace. For example
https://en.wikipedia.org/w/index.php?title=MediaWiki:Cite_references_link_many_format