tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
485 stars 38 forks source link

Inline CSS broken after first ´statement which references a variable #279

Closed DavidBeh closed 2 years ago

DavidBeh commented 2 years ago

image

Code recognition of CSS breaks after the first statement referencing a variable when inlined into an HTML Element. This affects things like suggestions and syntax-highlighting. (I am new to webdev, so terminology may not be correct)

In the example above and below it breaks after {b}

<script>
    let b = 50;
    let r = 20;
</script>

<div class="box" style="--b: {b}; --r: {r}"></div>

<style>
    .box {
        height: 100px;
        width: 100px;
        background: rgb(var(--r), 200, var(--b));
    }
</style>
tomblachut commented 2 years ago

Hi, duplicate of #80