Retiring support for 3-valued <position> (excluding background)
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
People
(Reporter: boris, Assigned: boris)
References
()
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(3 files)
Based on spec issue 2140, the 3-valued positions shouldn't be accepted, except for background. Blink retires the support in Chrome 68, and they added some tests into wpt [1][2][3]. Perhaps we should update the parser of these properties (or values::generics::position::Position
type).
Besides, the spec, https://drafts.csswg.org/css-values-4/#position, mention:
Note: The background-position property also accepts a three-value syntax. This has been disallowed generically because it creates parsing ambiguities when combined with other length or percentage components in a property value.
[1] <object-position>
[2] <perspective-origin>
[3] <offset-anchor>
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Perhaps we should update the parser of these properties (or values::generics::position::Position type).
Sounds good, moving the current parse
implementation to something like parse_three_value
or parse_legacy
, then implementing a simpler parse
seems reasonable.
Assignee | ||
Comment 2•5 years ago
|
||
Cool. Thanks for the suggestion. This should be easy to fix.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Update the existing reftests to not use 3 valued syntax.
I run the script to update the syntax in
layout/reftests/w3c-css/submitted/images3/*
,
layout/reftests/xul/*
, and
layout/reftests/webm-video/*
:
function rename() {
find layout/reftests/\
-type f\
! -path "./obj*"\
! -path "./.git"\
! -path "./.hg"\
\( -name "*.html" -or\
-name "*.xul" \)\
-exec sed -i -e "s/$1/$2/g" "{}" \;
}
rename "object-position: top 3px center" "object-position: top 3px left 50%"
rename "object-position: center right 25%" "object-position: top 50% right 25%"
For others, I just manually update them.
Assignee | ||
Comment 4•5 years ago
|
||
According to this resolved spec issue:
https://github.com/w3c/csswg-drafts/issues/2140,
we retire the 3-valued <position> on
object-position
perspective-origin
,mask-position
circle()
andellipse()
, but still keep the support forbackground-position
.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
•
|
||
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7018488ca120
https://hg.mozilla.org/mozilla-central/rev/6ec2809da4e3
CSS WPT import at https://github.com/web-platform-tests/wpt/pull/17784
Comment 11•5 years ago
|
||
Posted site compatibility note: https://www.fxsitecompat.dev/en-CA/docs/2019/3-valued-css-position-is-no-longer-supported-except-for-background-position/
Assignee | ||
Comment 12•5 years ago
|
||
(In reply to Kohei Yoshino [:kohei] (Bugzilla UX) (FxSiteCompat) from comment #11)
Posted site compatibility note: https://www.fxsitecompat.dev/en-CA/docs/2019/3-valued-css-position-is-no-longer-supported-except-for-background-position/
Looks great. Thanks for this.
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Documented as per https://github.com/mdn/sprints/issues/2084
Assignee | ||
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
bugherder |
Description
•