Open Bug 1926969 Opened 1 year ago Updated 9 days ago

Reject `light-dark()` in `@property` as not computationally independent.

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

ASSIGNED
Size Estimate S

People

(Reporter: dshin, Assigned: zrhoffman)

References

(Blocks 2 open bugs)

Details

(Keywords: leave-open)

Attachments

(3 files)

As mentioned in bug 1924562 comment 2, light-dark is not computationally independent, which means the declaration should be dropped. But it seems like we just resolve to red.

As observed with the test case in console with CSS warnings/errors enabled, specifying 1em for a <length> property causes the declaration to be dropped, but the first one does not.

See Also: → 1924562

Bug 1926969 introduces a new example of computational dependence: The
light-dark() function. So specific references to lengths, like
allows_font_relative_lengths, should be generalized.

This patch also renames ParsingMode::DISALLOW_FONT_RELATIVE to
ParsingMode::DISALLOW_COMPUTATIONALLY_DEPENDENT`.

Assignee: nobody → zach
Status: NEW → ASSIGNED

Because light-dark() dependens on color-scheme, it is not
computationally independent.

Severity: -- → S3
Blocks: 1928867
Attachment #9433256 - Attachment description: Bug 1926969 - Mark light-dark() function as computationally dependent. r=tlouw,#style → Bug 1926969 - Mark light-dark() function and system colors as computationally dependent. r=tlouw,#style
Attachment #9433256 - Attachment description: Bug 1926969 - Mark light-dark() function and system colors as computationally dependent. r=tlouw,#style → Bug 1926969 - Mark non-absolute colors as computationally dependent. r=tlouw,#style
Attachment #9433256 - Attachment description: Bug 1926969 - Mark non-absolute colors as computationally dependent. r=tlouw,#style → Bug 1926969 - Mark color mode-depent colors as computationally dependent. r=tlouw,#style
Attachment #9433256 - Attachment description: Bug 1926969 - Mark color mode-depent colors as computationally dependent. r=tlouw,#style → Bug 1926969 - Mark color-scheme depent colors as computationally dependent. r=tlouw,#style
Keywords: leave-open
Pushed by zach@zrhoffman.net: https://hg.mozilla.org/integration/autoland/rev/9377aa9a7a6f Rename allows_font_relative_lengths to allows_computational_dependence r=firefox-style-system-reviewers,emilio

Do the devtools show something useful when the declaration is dropped?

Once bug 1916584 is resolved, DevTools will say:

@property initial-value descriptor ‘light-dark(red, green)’ is not computationally independent.
See Also: → 1932544

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?
For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

Before landing the patch, I want to open a spec issue to document this interpretation of the spec.

Flags: needinfo?(emilio)

Did we file the spec issue here? It seems like we're in a situation where all browsers agree on a specific behaviour, so the longer we wait the higher the chance of getting a compat issue if we try to change anything.

Flags: needinfo?(zach)

(In reply to James Graham [:jgraham] from comment #9)

Did we file the spec issue here? It seems like we're in a situation where all browsers agree on a specific behaviour, so the longer we wait the higher the chance of getting a compat issue if we try to change anything.

Sorry for the delay, I have filed the spec issue. https://github.com/w3c/csswg-drafts/issues/12735

Flags: needinfo?(zach)
Size Estimate: --- → S
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: