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

Hide light/dark word on mobile #70

Closed
Regenhardt opened this issue May 29, 2023 · 3 comments
Closed

Hide light/dark word on mobile #70

Regenhardt opened this issue May 29, 2023 · 3 comments

Comments

@Regenhardt
Copy link

On mobile the Dark/Light word of the dark mode toggle goes into the actual content. I think it would work to just hide it and rely on the symbol alone to serve as sufficient hint about what it does:
grafik

@Regenhardt
Copy link
Author

Tried the following but it didn't work, not sure why:

@media(max-width: 1080px) {
  dark-mode span.wrapper > span:nth-last-child() {
    display: none;
  }
}

jaywcjlove added a commit that referenced this issue Jan 2, 2025
github-actions bot pushed a commit that referenced this issue Jan 2, 2025
@jaywcjlove
Copy link
Owner

@Regenhardt Updated 5.0.3: You can use the following CSS selectors to hide the text and icon parts of the dark-mode component:

dark-mode::part(text) {
    display: none;
}
dark-mode::part(icon) {
    display: none;
}

@Regenhardt
Copy link
Author

Very nice, thank you.

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