Page MenuHomePhabricator

Figures should support `inline-start` and `inline-end` alignments in addition to `left` and `right`.
Open, Needs TriagePublicFeature

Description

See the definitions of inline-start and inline-end in https://developer.mozilla.org/en-US/docs/Web/CSS/float

Some existing defaults (eg, the default alignment for thumb) are actually start currently, we're just doing this in an adhoc manner.

Can I Use: float flow relative values

See T269704: Default horizontal alignment of thumbnails should depend on content language, not the UI.

Event Timeline

Tacsipacsi changed the subtype of this task from "Task" to "Feature Request".Mar 28 2022, 8:45 AM
Tacsipacsi added a project: RTL.
Tacsipacsi subscribed.

I think it should be done in a similar manner to how thumbs works: not using inline-{start,end} directly in the result HTML/CSS, but rewriting the input inline-{start,end} (or maybe just {start,end}?) to left or right depending on the page language. This would make sure that e.g. partially translated pages, which have mixed directionality, don’t mix the image positions.

Change #1050707 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[css-sanitizer@master] Add support for logical values in float property

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

Ebrahim subscribed.

Sorry for the noise, the patch wasn't related to this issue.

Change #1053987 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[mediawiki/core@master] Support inline-start and inline-end for alignment of images

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

I've uploaded a patch to support inline-start and inline-end and it works locally but it needs some tests and parsoid to be made compatible, but actually I like to suggest use of 'start' and 'end', without 'inline' before too late,

Upsides:

  • inline-start and inline-end feels like too mouthy, it's perhaps will be easier to convince people say in English Wikipedia to use 'start' and 'end' than 'inline-start' end 'inline-end'
  • inline-start and inline-end is harder to translate at least in my language, someone that wants to translate it should know the meaning of inline, yet start and end themselves are easy to translate and use for regular users
  • https://developer.mozilla.org/en-US/docs/Web/CSS/text-align also support 'start' and 'end' values and our images despite using 'float' are about how they match with text and not what specific CSS feature they align to.

Downside:

  • It is possible 'start' and 'end' are used already for thumbnails subtitles but I believe that isn't frequent if none.

I also think "start" and "end" is better than "inline-start" and "inline-end". After all, these are allowed values for the align parameter; align=center and align=start read well, and align=inline-start is too verbose with no real advantage.

The issue with start and end without inline is that now you're forgetting there are languages that aren't just rtl/ltr but also top to bottom (I don't think there are any bottom to top languages). That's why they have the name 'inline', as in, the inline direction.

Text-align is relevant only in an inline context, which is why it doesn't carry the inline word part.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy