Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web: Select tokens seem to be missing #142

Open
Elias-Graf opened this issue Mar 9, 2024 · 2 comments
Open

Web: Select tokens seem to be missing #142

Elias-Graf opened this issue Mar 9, 2024 · 2 comments

Comments

@Elias-Graf
Copy link

I have used the following code (mostly from this README), to generate and apply the color scheme:

// Get the theme from a hex color
const theme = themeFromSourceColor(argbFromHex("#FF0000"));

// Apply the theme to the body by updating custom properties for material tokens
applyTheme(theme, { target: document.body, dark: true });

And the styles seem to be missing for the panel of the select:

image

image

Reproduction: https://stackblitz.com/edit/vitejs-vite-6qdvam?file=src%2FApp.svelte

  "dependencies": {
    "@material/material-color-utilities": "^0.2.7",
    "@material/web": "^1.3.0"
  }
@Elias-Graf Elias-Graf changed the title Web: Select styles seem to be missing Web: Select tokens seem to be missing Mar 9, 2024
@Elias-Graf
Copy link
Author

Elias-Graf commented Mar 10, 2024

After further investigation, although I'm not 100% certain, I don't think the issue is with this repository. As far as I understand, from skimming though the code, the utilities set tokens starting with --md-sys. Further tokens, seem to be the responsibility of the web components themselves. Such as the container element md-outlined-field. This component doesn't seem to set any tokens regarding menus on it. I suspect, they are missing, since I don't think I have found any other "floating" menus implemented for the web in the documentation: https://m3.material.io/components. In fact, there doesn't even seem to be an entry for the select components. Only menus, which are "Planned". But I found documentation on them, in this repository: https://github.com/material-components/material-web/blob/main/docs/components/select.md.

If the issue is not on my side, I would kindly request this issue to be moved to the correct place, if possible :). Of course, I will gladly copy it to the correct place, if pointed out.

Edit:

I have found the markdown documentation on the menu, and as I suspected, it suffers from the same issue:
image

I have added the menu to the reproduction.

@voi99
Copy link

voi99 commented Mar 18, 2024

Encountering the same issue, (container-color) tokens for elevated button are not being generated

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants