Skip to content

CSS Selectors with direction rtl falsely marked as unused #2950

@benjazehr

Description

@benjazehr

https://svelte.dev/repl/7c9308930e8e4a3c817a1ba232acae31?version=3.4.4

I want to make my app right-to-left compatible. For this reason I need to add rtl-specific styling, but svelte marks my selectors as unused and removes them:

h1 {
	color: blue;
}
h1[dir="rtl"] {
	color: red;
}

becomes:

h1.svelte-r7z1mq{color:blue}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions