Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSS: registerProperty() support to theme #182

Closed
morewings opened this issue Mar 27, 2024 · 0 comments
Closed

Add CSS: registerProperty() support to theme #182

morewings opened this issue Mar 27, 2024 · 0 comments
Labels
enhancement New feature or request Theme Tasks related to Forge theme
Milestone

Comments

@morewings
Copy link
Owner

morewings commented Mar 27, 2024

The goal is to support color animation

CSS.registerProperty({
  name: '--stop-color',
  syntax: '<color>',
  inherits: false,
  initialValue: 'blue',
});
button {
  --stop-color: red;
  transition: --stop-color 1s;
}

button:hover {
  --stop-color: green;
}

https://developer.mozilla.org/en-US/docs/Web/API/CSS/registerProperty_static

https://www.w3.org/TR/css-properties-values-api-1/#supported-names

Related: morewings/css-vars-hook#17

@morewings morewings added enhancement New feature or request Theme Tasks related to Forge theme labels Mar 27, 2024
@morewings morewings added this to the Version Prima milestone Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Theme Tasks related to Forge theme
Projects
None yet
Development

No branches or pull requests

1 participant