material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
363 stars 28 forks source link

Opacity styles don't switch between day and night themes #62

Closed PrattiDev closed 2 years ago

PrattiDev commented 2 years ago

Describe the bug While all other styles switch to their /dark/ counterparts as expected, the opacity styles — used for state management in components — do not.

To Reproduce Steps to reproduce the behavior:

  1. Get any component with an opacity style applied to it.
  2. Open the Material Theme Builder plugin.
  3. Click on the moon icon to switch themes.
  4. The opacity style will not update alongside all the others.

Expected behavior The style is supposed to swap to its dark counterpart so users can quickly switch themes without hunting down instances of opacity styles to manually switch.

Screenshots

Here is a FAB in a pressed state. It contains an opacity layer, corresponding with the Material You guidelines. Its pressed state overlay does not switch accordingly.

bug_report

Desktop:

pbutterworth commented 2 years ago

Similar/duplicate of #59

PrattiDev commented 2 years ago

With the latest update, this has been fixed. The token structure has been updated, so it won't work without renaming and adapting style folders inside Figma, but the plugin will recognize the proper paths and update them accordingly afterwards.