Skip to content

Deprecation Warnings from @material #281

@tuckergordon

Description

@tuckergordon

Describe the bug
Using themed components results in deprecation warnings from @Material (e.g. Using / for division is deprecated). This can be fixed by upgrading to the latest version of @Material (as of writing, that means upgrading from 11 to 12).

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Svelte project
npx degit sveltejs/template my-svelte-project`)
  1. Install smui/button
npm install --save @smui/button
  1. Go through the steps for the Advanced Styling Method
    a. npm install --save-dev sass rollup-plugin-postcss
    b. Add sass to your rollup config
    c. Add a blank _smui-theme.scss file (this prevents a compilation error, but it doesn't need any code in it)
  2. Add a styled button to your App component:
<script>
  import Button from '@smui/button/styled';
</script>

<Button>Hello</Button>
  1. npm run dev will result in deprecation warnings

Screenshots
image

Additional context

I've only tested this with Button, but manually installing the latest version of the material dependencies fixed the issue. E.g. installing

    "@material/button": "^12.0.0",
    "@material/elevation": "^12.0.0",
    "@material/feature-targeting": "^12.0.0",
    "@material/ripple": "^12.0.0",
    "@material/theme": "^12.0.0",

But given how many components there are, I wouldn't be surprised if others required more adjustments to work with the newer version of material.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions