josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
818 stars 108 forks source link

"Unused CSS selector" warnings during build #317

Closed kefahi closed 8 months ago

kefahi commented 9 months ago

When building a simple project that uses svelte-jsoneditor (latest build 0.18.8) I get the following warnings ...

1:35:15 AM [vite-plugin-svelte] /home/imx/dmart/frontend/node_modules/svelte-jsoneditor/components/modals/JSONRepairModal.svelte:49:0 Unused CSS selector ".jse-modal .jse-modal-contents"
47: }
48: 
49: .jse-modal .jse-modal-contents {
    ^
50:   flex: 1;
51:   display: flex;
1:35:15 AM [vite-plugin-svelte] /home/imx/dmart/frontend/node_modules/svelte-jsoneditor/components/modals/JSONRepairModal.svelte:59:0 Unused CSS selector ".jse-modal .jse-modal-contents .jse-actions"
57: }
58: 
59: .jse-modal .jse-modal-contents .jse-actions {
    ^
60:   display: flex;
61:   flex-direction: row;
1:35:15 AM [vite-plugin-svelte] /home/imx/dmart/frontend/node_modules/svelte-jsoneditor/components/modals/JSONRepairModal.svelte:66:0 Unused CSS selector ".jse-modal .jse-modal-contents .jse-actions button.jse-primary"
64: }
65: 
66: .jse-modal .jse-modal-contents .jse-actions button.jse-primary {
    ^
67:   border: none;
68:   background: transparent;
1:35:15 AM [vite-plugin-svelte] /home/imx/dmart/frontend/node_modules/svelte-jsoneditor/components/modals/JSONRepairModal.svelte:81:0 Unused CSS selector ".jse-modal .jse-modal-contents .jse-actions button.jse-primary:hover"
79: }
80: 
81: .jse-modal .jse-modal-contents .jse-actions button.jse-primary:hover {
    ^
82:   background: var(--jse-button-primary-background-highlight);
83: }
1:35:15 AM [vite-plugin-svelte] /home/imx/dmart/frontend/node_modules/svelte-jsoneditor/components/modals/JSONRepairModal.svelte:85:0 Unused CSS selector ".jse-modal .jse-modal-contents .jse-actions button.jse-primary:disabled"
83: }
84: 
85: .jse-modal .jse-modal-contents .jse-actions button.jse-primary:disabled {
    ^
86:   background: var(--jse-button-primary-background-disabled);
87: }
josdejong commented 9 months ago

Thanks for reporting, I noticed that too. It's fixed via 23b82cc022e15ccbcad6ca4d51ece52ca41682b4 and the fix will be published soon.

josdejong commented 8 months ago

Fixed now in v0.18.9