Open emilio opened 3 months ago
Yeah if you are having to ship it then we should spec it, and seems resonable.
Arguably this would go in the align spec, as it is very similar to justify-self:blah for block layout (even though nobody has implemented that yet afaik). https://drafts.csswg.org/css-align-3/#justify-block
IMO this logic makes no sense in text-align
because it's not about aligning text.
I think implementations should just implement justify-items
and justify-self
for blocks, and map:
<center>
and <div align="center">
into justify-items: legacy center; text-align: center
<div align="left">
into justify-items: legacy left; text-align: left
<div align="right">
into justify-items: legacy right; text-align: right
In fact, the entire point of legacy
was supporting these things.
Then, if compat requires supporting text-align: -webkit-{left,right,center}
, add that in the compat spec and say that they force justify-items: legacy
to gain the corresponding keyword at computed-value time.
CC @fantasai as per https://github.com/whatwg/html/issues/3428
The CSS Working Group just discussed [css-text] Specify HTML alignment as text-align: -webkit-{left,right,center}
, and agreed to the following:
RESOLVED: Specify the -webkit-* values for text-align in the Compat spec.
dbaron: Because for example you can override this inherited behavior by setting another value on text-align. We need to see if that's something that's ok to break.
My suspicion is that this will turn out not to be something that's ok. The pattern which (with my web author's hat on) I suspect to be common is:
<center>
<div style="text-align: left">...</div>
</center>
All browser engines implement the HTML align attribute with a special value of
text-align
, rather than as the HTML spec describes. Those values are-{moz,webkit}-{left,right,center}
, and for mostly legacy accidents, they are exposed to stylesheets and actively used (yikes).Rather than keeping the status quo where the specification doesn't contain these values, and the HTML spec says something that no browser does, I propose to define how these works in terms of the
-webkit-
prefixed version.Is there any reason not to do that? cc @bfgeek @frivoal