Skip to content

Formatting <style> tag flattens css #66

Open

Description

@zkat

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

Activity

  1. paulstatezny commented on Mar 25, 2024

    @paulstatezny
    Collaborator

    PRs are welcome :)

  2. msaraiva commented on Mar 26, 2024

    @msaraiva
    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?

  3. paulstatezny commented on Mar 26, 2024

    @paulstatezny
    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

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