Skip to content

[ButtonGroup] Nested buttons are also styled as if they were directly placed #4242

@mateusznarowski

Description

@mateusznarowski

Environment

  • Operating System: Darwin
  • Node Version: v23.11.0
  • Nuxt Version: 3.17.4
  • CLI Version: 3.25.1
  • Nitro Version: 2.11.12
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.1.3

Reproduction

https://codesandbox.io/p/devbox/condescending-euclid-k9r7nc

Description

When a Modal is in a ButtonGroup, all buttons inside the Modal (including the X button) are styled as elements directly in the ButtonGroup

<template>
  <UButtonGroup>
    <UInput placeholder="Search..." />
    <UModal>
      <UButton color="neutral" variant="outline">
        Open modal
      </UButton>

      <template #body>
        <UButton label="button1" />
        <UButton label="button2" />
        <UButton label="button3" />
      </template>
    </UModal>
  </UButtonGroup>
</template>

Image

Also, size and orientation affect the buttons inside the modal

<template>
  <UButtonGroup orientation="vertical" size="lg">
    ...
  </UButtonGroup>
</template>

Image

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclosed-by-botstaletriageAwaiting initial review and prioritizationv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions