Skip to content

issue with var on multiline #357

Description

@Ruud68

Hi,
having an issue with vars that are 'styled' on multiple lines (on latest commit dd jan 10, 2022):

This works correct:

:root {
	--my-color: 255, 0, 0;
	--my-opacity: 210;
}

body {
	background-color: rgba(var(--my-color), var(--my-opacity)) !important;
}

it renders to:

:root {
	--my-color: 255, 0, 0;
	--my-opacity: 210;
}

body {
	background-color: rgba(var(--my-color), var(--my-opacity)) !important;
}

but this doesn't work correct:

:root {
	--my-color: 255, 0, 0;
	--my-opacity: 210;
}

body {
	background-color: rgba(
		var(--my-color),
		var(--my-opacity)
	) !important;
}

it renders to:

:root {
        --my-color: 255, 0, 0;
        --my-opacity: 210;
}

body {}

This is only the case when using vars, as the following is styled the same and works correct:

:root {
	--my-color: 255, 0, 0;
	--my-opacity: 210;
}

body {
	background-color: rgba(
		255,
		234,
		231,
		210
	) !important;
}

this renders to:

:root {
        --my-color: 255, 0, 0;
        --my-opacity: 210;
}

body {
        background-color: rgba(255, 234, 231, 210) !important;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions