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

issue with var on multiline #357

Open
Ruud68 opened this issue Jan 13, 2022 · 1 comment
Open

issue with var on multiline #357

Ruud68 opened this issue Jan 13, 2022 · 1 comment

Comments

@Ruud68
Copy link
Contributor

Ruud68 commented Jan 13, 2022

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;
}
@raxbg
Copy link
Contributor

raxbg commented Sep 20, 2022

Fixed by #202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants