-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Description
When I use Material Web Components with Svelte, attributes without value are discarded and thus result in incorrectly styled element. I guess because they are unknown attributes so the default value for them is undefined and thus were removed under the rule "no nullish". Is there a way to keep these attributes as-is, or I have to wrap them inside Svelte component and export the boolean properties corresponding to these attributes?
How to reproduce
npx degit sveltejs/template example-project
cd example-project
npm i
npm add svelte@latest
npm add @material/mwc-buttonChange the content of App.svelte to
<script>
import '@material/mwc-button';
</script>
<main>
<mwc-button raised label="Hello"/>
<mwc-button raised=y label="Hello"/>
</main>then run with
npm run devOther information
- Svelte version: 3.32.1
- I use Rollup (from the project template)