[css-properties-values-api] Support <string> syntax
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: zrhoffman, Assigned: zrhoffman)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
bugherder |
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?
Assignee | ||
Comment 7•1 year ago
|
||
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;
}
Thanks for the help, Zach! Yes, the color worked without the quotes. Thanks for the hint to see it working in Firefox.
Description
•