ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Using style tag within template tag without lint error as default

Open bitxplora opened this issue 1 year ago • 3 comments

The default template-lint rule forbids using of

<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.

bitxplora avatar Oct 03 '24 07:10 bitxplora

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

NullVoxPopuli avatar Oct 03 '24 12:10 NullVoxPopuli

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.

bitxplora avatar Oct 03 '24 12:10 bitxplora

This may be what you want https://github.com/auditboard/ember-scoped-css

NullVoxPopuli avatar Oct 30 '25 21:10 NullVoxPopuli