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

Formatting <style> tag flattens css #66

Open
zkat opened this issue Mar 25, 2024 · 3 comments
Open

Formatting <style> tag flattens css #66

zkat opened this issue Mar 25, 2024 · 3 comments

Comments

@zkat
Copy link

zkat commented Mar 25, 2024

The contents of the style tag should probably be run through a reasonable css formatter. Right now, they're just flattened to the left:

20240324_18h31m45s_grim

@paulstatezny
Copy link
Collaborator

PRs are welcome :)

@msaraiva
Copy link
Member

Hey @zkat!

Thanks for reporting this issue. I believe the surface formatter shouldn't touch anything inside <style> as we don't want to keep a full-featured css parser and formatter inside Surface. We should treat it just like a macro component and ignore any of its content. Then you could probably set up your own formatter/linter, something like Prettier to do that job for you.

@paulstatezny I believe the fix would be to add a clause for style here, right?

@paulstatezny
Copy link
Collaborator

@msaraiva Yes, adding a clause there would prevent the formatter from modifying the contents of <style> tags.

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

3 participants