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

Using style tag within template tag without lint error as default #20770

Open
bitxplora opened this issue Oct 3, 2024 · 2 comments
Open

Using style tag within template tag without lint error as default #20770

bitxplora opened this issue Oct 3, 2024 · 2 comments

Comments

@bitxplora
Copy link

bitxplora commented Oct 3, 2024

The default template-lint rule forbids using of <style> in the glimmer component: e.g;

<template>
 const sum = 2 + 5;
 <p> The sum of 2 plus 5 is {{sum}}. </p>
 
 <style>
    font-family: serif;
 </style>
</template>
error  Use of <style> detected. Do not use forbidden elements.  no-forbidden-elements

This will give the wrong impression that a style tag should not be used within a template tag.

I think the rule should be overridden for gjs/gts components.

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Oct 3, 2024

I agree!
We need to progress the RFC for scoped styles tho

@bitxplora
Copy link
Author

I agree! We need to progress the RFC for scoped styles tho

The discussion on the scoped styles is still in progress, the core team will have to finalize it.

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