Display @position-try rules
Categories
(DevTools :: Inspector: Rules, task, P3)
Tracking
(firefox147 fixed, firefox148 fixed)
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 3 open bugs)
Details
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
| Assignee | ||
Comment 1•1 year ago
|
||
Note that:
The <dashed-ident> specified in the prelude is the rule’s name. If multiple @position-try rules are declared with the same name, the last one in document order "wins".
There's no indication about how this should behave if the rule is in a grouping rule like @media, @container, @layout, @starting-style, or even a regular CSSStyleRule.
Jonathan, am I missing something from the spec, or does it mean that the last @position-try rules in the document always win, no matter if it's nested in another rule?
Comment 2•1 year ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #1)
Jonathan, am I missing something from the spec, or does it mean that the last
@position-tryrules in the document always win, no matter if it's nested in another rule?
I don't think that would make sense. The spec text just needs to account for these scenarios. I've filed a spec bug at:
Updated•1 month ago
|
| Assignee | ||
Comment 3•15 days ago
•
|
||
Adding dependency on Bug 2004036 for now, as adding/modifying declaration from the inspector won't have any effect on the element, which could be surprising for users.
Or we could display the @position-try rule as read-only first, so we do show them in 147 (when we add support for anchor positioning), and then we can have another bug to make those editable once Bug 2004036 is fixed
| Assignee | ||
Updated•15 days ago
|
| Assignee | ||
Comment 4•15 days ago
|
||
In a similar fashion to what we do for @keyframes rules, we collect the different
@position-try rules from the stylesheets of the page, and only return them
when they're actually being used in a position-try-fallback declaration.
For now, we show them as read-only, as updating the declarations of CSSPositionTryRule
is still brittle (see Bug 2004046).
A test is added to cover this.
Updated•15 days ago
|
Comment 6•9 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 7•9 days ago
|
||
In a similar fashion to what we do for @keyframes rules, we collect the different
@position-try rules from the stylesheets of the page, and only return them
when they're actually being used in a position-try-fallback declaration.
For now, we show them as read-only, as updating the declarations of CSSPositionTryRule
is still brittle (see Bug 2004046).
A test is added to cover this.
Original Revision: https://phabricator.services.mozilla.com/D275075
Updated•9 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Description
•