Skip to content

Css variable declaration shorthand #16071

Open
@JonathonRP

Description

@JonathonRP

Describe the problem

Js variables ability to use in css best option is a style directive, and svelte 5 moving away from directive uses it would not be easily remembered to use which makes it harder to use js in css.

Describe the proposed solution

To be able to use <style --x={x}> to declare css variable with shorthand to make using js variable in css as css variable easier and nicer.

(also see #16071 (comment))

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    cssStuff related to Svelte's built-in CSS handling

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions