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

Inline comments remove spaces #317

Open
artursvonda opened this issue Aug 23, 2023 · 1 comment
Open

Inline comments remove spaces #317

artursvonda opened this issue Aug 23, 2023 · 1 comment

Comments

@artursvonda
Copy link

Running

import {compile, serialize, stringify} from 'stylis'

const css = `
            grid-template-columns:
                minmax(100px, 1fr)
                155px
                24px;
`;

const css2 = `
            grid-template-columns:
                minmax(100px, 1fr) /* comment */
                155px /* comment */
                24px; /* comment */
`;


console.log(serialize(compile(css), stringify));

console.log(serialize(compile(css2), stringify));

Produces following results

grid-template-columns:minmax(100px, 1fr) 155px 24px;
grid-template-columns:minmax(100px, 1fr)155px24px;

which caused the grid-template-columns to become invalid and be dropped.

@Andarist
Copy link
Collaborator

PRs are welcome

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