Skip to content

Conversation

@moshetanzer
Copy link
Contributor

@moshetanzer moshetanzer commented Nov 6, 2025

This is just the first one to see if the team are happy with it - will do rest of buttons if you are 😄 thanks for your work

EDIT

Cant really think of a normal way to do UColorModeSwitch and UColorModeSelect and UColorModeAvatar and UColorModeImage are already using the method used in this implem.

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions bot added the v4 #4488 label Nov 6, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 6, 2025

npm i https://pkg.pr.new/@nuxt/ui@5394

commit: a5499e9

@moshetanzer moshetanzer changed the title feat: use css to detect color mode to avoid using <ClientOnly> refactor: use css to detect color mode to avoid using <ClientOnly> Nov 6, 2025
@benjamincanac benjamincanac changed the title refactor: use css to detect color mode to avoid using <ClientOnly> fix(ColorModeButton): use css to detect color mode to avoid using <ClientOnly> Nov 10, 2025
Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked in the preview and it's rendered super small 🤔

Also, you need to remove the defineSlots which is useless.

Could this be worth applying the same changes in the Vue ColodeModeButton as well?

@moshetanzer
Copy link
Contributor Author

cant imagine what issue size could be. Have removed unused code

@benjamincanac benjamincanac changed the title fix(ColorModeButton): use css to detect color mode to avoid using <ClientOnly> fix(ColorModeButton): use css to display color mode icon Nov 17, 2025
@benjamincanac benjamincanac merged commit 1d1c638 into nuxt:v4 Nov 17, 2025
16 checks passed
@moshetanzer moshetanzer deleted the feat/use-css-for-color-mode branch November 17, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants