Skip to content

Commit c162a91

Browse files
authored
Merge pull request #5941 from dfsmania/improve-dropdowns
Improve dropdowns and dropdown menu styles
2 parents 512e7bf + 5c972f2 commit c162a91

File tree

3 files changed

+9
-32
lines changed

3 files changed

+9
-32
lines changed

src/html/components/dashboard/_topbar.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ const deploymentPath = depth === 0 ? './' : '../'.repeat(depth);
209209
<!--end::Menu Body-->
210210
<!--begin::Menu Footer-->
211211
<li class="user-footer">
212-
<a href="#" class="btn btn-default btn-flat">Profile</a>
213-
<a href="#" class="btn btn-default btn-flat float-end">Sign out</a>
212+
<a href="#" class="btn btn-outline-secondary">Profile</a>
213+
<a href="#" class="btn btn-outline-danger float-end">Sign out</a>
214214
</li>
215215
<!--end::Menu Footer-->
216216
</ul>

src/html/components/docs/components/main-header.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@
185185
</li>
186186
<!-- Menu Footer-->
187187
<li class="user-footer">
188-
<a href="#" class="btn btn-default btn-flat">Profile</a>
189-
<a href="#" class="btn btn-default btn-flat float-end">Sign out</a>
188+
<a href="#" class="btn btn-outline-secondary">Profile</a>
189+
<a href="#" class="btn btn-outline-danger float-end">Sign out</a>
190190
</li>
191191
</ul>
192192
</li>

src/scss/_dropdown.scss

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
//
44

55
// General Dropdown Rules
6-
//.dropdown-item {
7-
// &:first-of-type {
8-
// @include border-top-radius($border-radius);
9-
// }
10-
// &:last-of-type {
11-
// @include border-bottom-radius($border-radius);
12-
// }
13-
//}
6+
7+
// Ensure children cannot overflow and break the dropdown border radius
8+
.dropdown-menu {
9+
overflow: hidden;
10+
}
1411

1512
.fs-7 {
1613
.dropdown-menu {
@@ -158,15 +155,9 @@
158155
}
159156

160157
> .dropdown-menu {
161-
@include border-top-radius(0);
162158
width: 280px;
163159
padding: 0;
164160

165-
&,
166-
> .user-body {
167-
@include border-bottom-radius(4px);
168-
}
169-
170161
// Header menu
171162
> li.user-header {
172163
min-height: 175px;
@@ -205,10 +196,6 @@
205196

206197
a {
207198
text-decoration: none;
208-
@include media-breakpoint-up(sm) {
209-
color: var(--#{$prefix}body-color) !important;
210-
background-color: var(--#{$prefix}body-bg) !important;
211-
}
212199
}
213200
}
214201

@@ -217,16 +204,6 @@
217204
@include clearfix();
218205
padding: 10px;
219206
background-color: var(--#{$prefix}light-bg);
220-
221-
.btn-default {
222-
color: var(--#{$prefix}body-color);
223-
224-
&:hover {
225-
@include media-breakpoint-up(sm) {
226-
background-color: var(--#{$prefix}body-bg);
227-
}
228-
}
229-
}
230207
}
231208
}
232209

0 commit comments

Comments
 (0)