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
Rendering in <style> tags causes extra line breaks #1374
Comments
idk how important this is, because behaviorally, everything works... |
This is my full component (in case anyone else comes across this and wants shadow dom fun): import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
interface Args {
omitStyles: boolean;
}
export default class Shadowed extends Component<Args> {
@tracked shadow?: ShadowRoot;
vendor = '/assets/vendor.css';
tailwind = '/assets/tailwind.css';
app = '/assets/limber.css';
attachShadow = (element: HTMLElement) => {
this.shadow = element.attachShadow({ mode: 'open' });
};
<template>
<div {{this.attachShadow}}></div>
{{#if this.shadow}}
{{#in-element this.shadow}}
{{#unless @omitStyles}}
<style type="text/css">
@import '{{this.tailwind}}';
@import '{{this.vendor}}';
@import '{{this.app}}';
</style>
{{/unless}}
{{yield}}
{{/in-element}}
{{/if}}
</template>
} |
Try: |
Same results |
I guess this is similar to those two issues - emberjs/ember.js#19602 and emberjs/ember.js#19603. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code
Output (just the style part)
Expected:
The text was updated successfully, but these errors were encountered: