Page MenuHomePhabricator

Use CSS bullets where applicable
Open, LowPublic

Assigned To
None
Authored By
Volker_E
Oct 1 2019, 11:25 PM
Referenced Files
F31769231: 02-CSS.png
Apr 20 2020, 8:48 PM
F31769230: 01-SVG.png
Apr 20 2020, 8:48 PM
F31769229: 03-flags.png
Apr 20 2020, 8:48 PM
F31513775: VirtualBox_Ubuntu 15_15_01_2020_23_48_41.png
Jan 15 2020, 10:52 PM
F31513771: VirtualBox_Ubuntu 15_15_01_2020_23_46_37.png
Jan 15 2020, 10:52 PM
F31513765: Screen Shot 2020-01-15 at 23.43.02.png
Jan 15 2020, 10:52 PM
F31513763: Screen Shot 2020-01-15 at 23.42.20.png
Jan 15 2020, 10:52 PM
F31513767: Screen Shot 2020-01-15 at 23.43.42.png
Jan 15 2020, 10:52 PM
Tokens
"Orange Medal" token, awarded by Krinkle.

Description

Due to Vector's use of sans-serif and a smaller font-size we're currently dealing with mis-positioning and wrong color when normal CSS bullets would be used.
Therefore Vector relies on an SVG image.

SVG bullets where supported (current)CSS bullets type: disc
image.png (361×875 px, 66 KB)
image.png (359×871 px, 66 KB)

As this comes at cost of another HTTP request, a CSS-only solution seems to be preferable.

[[ https://caniuse.com/#feat=mdn-css_selectors_marker | ::marker ]] would come to the rescue, currently implemented in Firefox 68+ & Safari.

image.png (365×868 px, 72 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 540247 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/skins/Vector@master] [POC] Use CSS ::marker instead of SVG bullets where applicable

https://gerrit.wikimedia.org/r/540247

Krinkle subscribed.

See upstream https://bugs.chromium.org/p/chromium/issues/detail?id=457718, I've left a comment and associated it with our meta issue (link).

I want to contribute to this. How can I help? I am new to this

Krinkle changed the task status from Open to Stalled.Dec 16 2019, 9:05 PM
Krinkle added a project: Upstream.

@Nileshdas50 This improvement is not yet actionable as we are waiting for Google Chrome to implement support for the CSS feature we are looking to use.

On Windows, this looks okay; but on Ubuntu 18.04, the effect is extremely silly. {F31485162}

Looks like the character you picked is a lot larger in whatever font it's using. The CSS spec recommends using \2022 instead (https://drafts.csswg.org/css-counter-styles-3/#simple-symbolic), but that one is tiny in comparison (although it seems consistent between Windows and Ubuntu, so maybe there's some solution here)

@matmarex Would you share a screenshot with \2022 alternative as well?
With all bullets, it always comes down to the specific font, and as we're not using a web font, we will have to deal with variations when not relying on an image.

Let's compare OS/font variants and see if there a comprisable choice.

@Volker_E Here are some proper screenshots for comparison.

Windows 10, Firefox 73Ubuntu 18.04.3, Firefox 69
Current
Screen Shot 2020-01-15 at 23.42.20.png (800×1 px, 176 KB)
VirtualBox_Ubuntu 15_15_01_2020_23_46_37.png (800×1 px, 153 KB)
Proposed patch (\25CF at 0.85em)
Screen Shot 2020-01-15 at 23.43.02.png (800×1 px, 176 KB)
VirtualBox_Ubuntu 15_15_01_2020_23_48_02.png (800×1 px, 153 KB)
Proposed alternative (\2022 at 1em)
Screen Shot 2020-01-15 at 23.43.42.png (800×1 px, 175 KB)
VirtualBox_Ubuntu 15_15_01_2020_23_48_41.png (800×1 px, 153 KB)

This has landed in Chrome as an "Experimental Web Platform feature".

Preview:

01-SVG.png (1×1 px, 340 KB)
02-CSS.png (1×1 px, 308 KB)
SVG imageCSS marker
03-flags.png (454×2 px, 46 KB)
Experimental setting

Note that I had to change the rule from ul::marker to li::marker for it to work. So we should either bug upstream about that, or update our patch if it's fine that way.

Note that I had to change the rule from ul::marker to li::marker for it to work. So we should either bug upstream about that, or update our patch if it's fine that way.

::marker applies to li

It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements.

Marker boxes only exist for list items: on any other element, the ::marker pseudo-element’s content property must compute to none, which suppresses its creation.

Change 540247 abandoned by Jdlrobson:
[mediawiki/skins/Vector@master] [POC] Use CSS ::marker instead of SVG bullets where applicable

Reason:
532 days old patch.

https://gerrit.wikimedia.org/r/540247

Change 540247 restored by VolkerE:
[mediawiki/skins/Vector@master] [POC] Use CSS ::marker instead of SVG bullets where applicable

https://gerrit.wikimedia.org/r/540247

Change 540247 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] [POC] Use CSS ::marker instead of SVG bullets where applicable

Reason:

This patch is very outdated and not easily rebased so abandoning.

https://gerrit.wikimedia.org/r/540247

Krinkle changed the task status from Stalled to Open.May 24 2022, 6:34 PM
Krinkle removed a project: Upstream.