Closed Bug 1846635 Opened 11 months ago Closed 11 months ago

[css-properties-values-api] Support <string> syntax

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: zrhoffman, Assigned: zrhoffman)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: nobody → zach
Status: NEW → ASSIGNED
Attachment #9347019 - Attachment is obsolete: true
Pushed by zach@zrhoffman.net:
https://hg.mozilla.org/integration/autoland/rev/168ad53da9fd
[css-properties-values-api] Support <string> syntax r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41308 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Keywords: dev-doc-needed

Hello Zach, I am in the process of updating MDN docs to include support for <string> in the syntax descriptor. Doc updates for this can be tracked via the GitHub doc issue. I plan to wait until the update has landed in the specification (https://github.com/w3c/css-houdini-drafts/pull/1104).

In the meantime, I was testing out the code reported in Chrome bug. You can see the code here: https://codepen.io/dipikabh/pen/VwqyjrR

  • In Chrome, with the experimental setting enabled and using syntax: "*", the text "Hello World - info: none" appears, but there's no change in color.
  • In both Firefox Nightly and in Firefox 118, neither --info nor --textcolor seem to have any effect. What might I be missing in the code?
Flags: needinfo?(zach)

Hi Dipika!

  • In Chrome, with the experimental setting enabled and using syntax: "*", the text "Hello World - info: none" appears, but there's no change in color.

The initial value for --textcolor should have no quotes, just red.

  • In both Firefox Nightly and in Firefox 118, neither --info nor --textcolor seem to have any effect. What might I be missing in the code?

The initial value of registered properties is not used yet, :zsun and :fredw are working on it in bug 1840478. Until then, you can get the example you shared to work by specifying the properties separately. Something like this:

:root {
    --info: "none";
    --textcolor: red;
}
Flags: needinfo?(zach)

Thanks for the help, Zach! Yes, the color worked without the quotes. Thanks for the hint to see it working in Firefox.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: