Skip to content

Commit 8c739e7

Browse files
fantasaijakearchibald
authored andcommitted
[css-text-3][css-text-4] Compute match-parent to start on the root for implementation simplicity. w3c#6542
1 parent 867aadf commit 8c739e7

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

css-text-3/Overview.bs

+11-2
Original file line numberDiff line numberDiff line change
@@ -4901,11 +4901,17 @@ Text Alignment: the 'text-align' shorthand</h3>
49014901
except that an [=inherited value=] of
49024902
''text-align/start'' or ''text-align/end''
49034903
is interpreted against the parent’s
4904-
(or the [=initial containing block=]’s,
4905-
if there is no parent)
49064904
'direction' value
49074905
and results in a computed value of either
49084906
''text-align/left'' or ''text-align/right''.
4907+
Computes to ''text-align/start''
4908+
when specified on the [=root element=].
4909+
<!-- ideally it would compute against the root writing mode
4910+
and inherit as `left` or `right` for consistency in descendants,
4911+
but since this is complicated due to propagation
4912+
and match-parent has basically no real use case on root,
4913+
we're doing this instead because it's easy -->
4914+
49094915
When specified on the 'text-align' shorthand,
49104916
sets both 'text-align-all' and 'text-align-last' to ''text-align/match-parent''.
49114917

@@ -7909,6 +7915,9 @@ Recent Changes</h3>
79097915
and should apply any appropriate spelling changes
79107916
just as for automatic hyphenation at the same point.</ins>
79117917
</blockquote>
7918+
* Define ''text-align/match-parent'' on the [=root element=] to compute to ''text-align/start''
7919+
instead of computing against the [=principal writing mode=].
7920+
(<a href="https://github.com/w3c/csswg-drafts/issues/6542">Issue 6542</a>)
79127921

79137922
In addition there have been some minor editorial fixes.
79147923

css-text-4/Overview.bs

+8-2
Original file line numberDiff line numberDiff line change
@@ -6380,11 +6380,17 @@ Text Alignment: the 'text-align' shorthand</h3>
63806380
except that an [=inherited value=] of
63816381
''text-align/start'' or ''text-align/end''
63826382
is interpreted against the parent’s
6383-
(or the [=initial containing block=]’s,
6384-
if there is no parent)
63856383
'direction' value
63866384
and results in a computed value of either
63876385
''text-align/left'' or ''text-align/right''.
6386+
Computes to ''text-align/start''
6387+
when specified on the [=root element=].
6388+
<!-- ideally it would compute against the root writing mode
6389+
and inherit as `left` or `right` for consistency in descendants,
6390+
but since this is complicated due to propagation
6391+
and match-parent has basically no real use case on root,
6392+
we're doing this instead because it's easy -->
6393+
63886394
When specified on the 'text-align' shorthand,
63896395
sets both 'text-align-all' and 'text-align-last' to ''text-align/match-parent''.
63906396

0 commit comments

Comments
 (0)