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

Having a style tag in a string removes the style sheet rules #246

Closed
navorite opened this issue Aug 15, 2021 · 1 comment
Closed

Having a style tag in a string removes the style sheet rules #246

navorite opened this issue Aug 15, 2021 · 1 comment

Comments

@navorite
Copy link

navorite commented Aug 15, 2021

Suppose I have the following component:

<script>
  let srcdoc = `<style></style>`;
</script>

 <iframe
    class="content"
    title="Inline Viewer"
    name="Inline Viewer"
    {srcdoc}
  />

<style>
  .content {
    padding: 2px;
  }
</style>

After formatting the file, it outputs the following:

<script>
  let srcdoc = `<style></style>`;
</script>

 <iframe
    class="content"
    title="Inline Viewer"
    name="Inline Viewer"
    {srcdoc}
  />

<style></style>

Now if I didn't have the style tag in srcdoc, it would have outputted the correct result. I also think it's related in one way or another to #240, #70, #244

@navorite navorite changed the title Having a style tag in a string removes the style tag in the template. Having a style tag in a string removes the style sheet rules in the template. Aug 15, 2021
@navorite navorite changed the title Having a style tag in a string removes the style sheet rules in the template. Having a style tag in a string removes the style sheet rules Aug 15, 2021
@dummdidumm
Copy link
Member

Same cause as #244, will be fixed with the next release.

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