Skip to content

new rule: no-nested-style-tag #1186

Open
@baseballyama

Description

@baseballyama

Motivation

This rule prohibits the use of nested <style> tags to prevent unintended style application.

https://svelte.dev/docs/svelte/nested-style-elements

Description

Nested <style> tags are not scoped, which may lead to unintended styles being applied.

Examples

<script>
</script>

<!-- ✓ GOOD -->
<style>...</style>

<!-- ✗ BAD -->
<div>
  <style>...</style>
</div>

{@snippet}
  <style>...</style>
{/snippet}

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions