Skip to content

Commit 8e06efa

Browse files
committed
Improve dropdowns and dropdown menu styles
1 parent 512e7bf commit 8e06efa

File tree

3 files changed

+10
-32
lines changed

3 files changed

+10
-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: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
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+
// Add overflow hidden to prevent first/last childs from overflowing the border
8+
// radius of the dropdown-menu
9+
.dropdown-menu {
10+
overflow: hidden;
11+
}
1412

1513
.fs-7 {
1614
.dropdown-menu {
@@ -158,15 +156,9 @@
158156
}
159157

160158
> .dropdown-menu {
161-
@include border-top-radius(0);
162159
width: 280px;
163160
padding: 0;
164161

165-
&,
166-
> .user-body {
167-
@include border-bottom-radius(4px);
168-
}
169-
170162
// Header menu
171163
> li.user-header {
172164
min-height: 175px;
@@ -205,10 +197,6 @@
205197

206198
a {
207199
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-
}
212200
}
213201
}
214202

@@ -217,16 +205,6 @@
217205
@include clearfix();
218206
padding: 10px;
219207
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-
}
230208
}
231209
}
232210

0 commit comments

Comments
 (0)