window.CSS.registerProperty({
name: "--my-color",
syntax: "<color>",
inherits: false,
initialValue: "#c0ffee",
});CSS Properties and Values API / notebook
CSS Properties and Values API
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
@property --my-color {
syntax: "<color>";
inherits: false;
initial-value: #c0ffee;
}