Skip to content

Commit

Permalink
[fix] do not be over-eager in removing unused CSS for dialog[open] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuji Sugiura committed Apr 30, 2022
1 parent 2633500 commit a068719
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/compile/css/Selector.ts
Expand Up @@ -21,7 +21,8 @@ enum NodeExist {
}

const whitelist_attribute_selector = new Map([
['details', new Set(['open'])]
['details', new Set(['open'])],
['dialog', new Set(['open'])]
]);

export default class Selector {
Expand Down
@@ -0,0 +1 @@
dialog[open].svelte-xyz{display:grid}
7 changes: 7 additions & 0 deletions test/css/samples/attribute-selector-dialog-open/input.svelte
@@ -0,0 +1,7 @@
<dialog>Hello</dialog>

<style>
dialog[open] {
display: grid;
}
</style>

0 comments on commit a068719

Please sign in to comment.