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

Fix .dropdown-item border-radius when $dropdown-padding-y is 0 #36447

Merged
merged 1 commit into from Jun 2, 2022

Conversation

mdo
Copy link
Member

@mdo mdo commented May 26, 2022

Fixes #36329.

@mdo mdo added this to In progress in v5.2.0-stable via automation May 26, 2022
@mdo mdo requested a review from a team as a code owner May 26, 2022 21:41
@mdo mdo merged commit 824c5a0 into main Jun 2, 2022
v5.2.0-stable automation moved this from In progress to Done Jun 2, 2022
@mdo mdo deleted the dropdown-item-radius branch June 2, 2022 01:41
@@ -66,6 +66,18 @@
left: 0;
margin-top: var(--#{$prefix}dropdown-spacer);
}

@if $dropdown-padding-y == 0 {
> .dropdown-item:first-child,

Choose a reason for hiding this comment

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

Late to the party, but .dropdown-menu > li isn't right, there's usually an anchor (<a>) tag in between.
Shall we just skip the >?

Choose a reason for hiding this comment

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

@mdo I'm sure you get auto-tagged, but just in case you don't.

Copy link

@TomONeill TomONeill Jan 13, 2023

Choose a reason for hiding this comment

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

Hey @mdo, my last comment didn't make sense I just realised. But I do have a scenario where the fix doesn't work:

  <ul class="dropdown-menu">
    <div style="max-height: 400px">
      <li><a class="dropdown-item" href="#">Menu item</a></li>
      <li><a class="dropdown-item" href="#">Menu item</a></li>
      <li><a class="dropdown-item" href="#">Menu item</a></li>
    </div>
  </ul>

If we'd get rid of the > selector, I think it will work in these cases too.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v5.2.0-stable
  
Done
Status: Done
Development

Successfully merging this pull request may close these issues.

dropdown-item has wrong border-radius
2 participants