Skip to content

Commit

Permalink
(#285) Update Theme Toggle Styles
Browse files Browse the repository at this point in the history
This updates the theme toggle styles slightly to
add a width to the buttons to prevent it from
changing size when toggling between themes. This
also prevents the button from being underlined
on hover.
  • Loading branch information
st3phhays committed Apr 9, 2024
1 parent d27f789 commit a506492
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 104 deletions.
3 changes: 3 additions & 0 deletions dist/css/boxstarter.css
Original file line number Diff line number Diff line change
Expand Up @@ -51380,6 +51380,9 @@ main {
margin-bottom: 2rem;
}
}
.dropdown-theme .dropdown-toggle {
text-decoration: none !important;
}
.dropdown-theme .dropdown-item.active i.d-none {
display: block !important;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/css/boxstarter.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/css/chocolatey.css
Original file line number Diff line number Diff line change
Expand Up @@ -55263,6 +55263,9 @@ main {
margin-bottom: 2rem;
}
}
.dropdown-theme .dropdown-toggle {
text-decoration: none !important;
}
.dropdown-theme .dropdown-item.active i.d-none {
display: block !important;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/css/chocolatey.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/css/zendesk.css
Original file line number Diff line number Diff line change
Expand Up @@ -40899,6 +40899,9 @@ main {
margin-bottom: 2rem;
}
}
.dropdown-theme .dropdown-toggle {
text-decoration: none !important;
}
.dropdown-theme .dropdown-item.active i.d-none {
display: block !important;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/css/zendesk.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/partials/cshtml/_GlobalNavigation.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<li class="nav-item d-none d-md-flex align-items-center">
<div class="vr me-3 my-auto h-50"></div>
<div class="dropdown dropdown-theme">
<button class="btn btn-top-nav dropdown-toggle d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn btn-top-nav dropdown-toggle w-px-60 d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<button class="btn nav-link dropdown-toggle py-0 px-0 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn nav-link dropdown-toggle py-0 px-0 w-px-30 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<ul class="dropdown-menu dropdown-menu-end">
Expand Down
4 changes: 2 additions & 2 deletions dist/partials/cshtml/_ThemeToggle.cshtml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="dropdown dropdown-theme">
<button class="btn btn-top-nav dropdown-toggle d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn btn-top-nav dropdown-toggle w-px-60 d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<button class="btn nav-link dropdown-toggle py-0 px-0 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn nav-link dropdown-toggle py-0 px-0 w-px-30 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<ul class="dropdown-menu dropdown-menu-end">
Expand Down
4 changes: 2 additions & 2 deletions dist/partials/hbs/globalnavigation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ partial: globalnavigation
<li class="nav-item d-none d-md-flex align-items-center">
<div class="vr me-3 my-auto h-50"></div>
<div class="dropdown dropdown-theme">
<button class="btn btn-top-nav dropdown-toggle d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn btn-top-nav dropdown-toggle w-px-60 d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<button class="btn nav-link dropdown-toggle py-0 px-0 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn nav-link dropdown-toggle py-0 px-0 w-px-30 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<ul class="dropdown-menu dropdown-menu-end">
Expand Down
4 changes: 2 additions & 2 deletions dist/partials/hbs/themetoggle.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
partial: themetoggle
---
<div class="dropdown dropdown-theme">
<button class="btn btn-top-nav dropdown-toggle d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn btn-top-nav dropdown-toggle w-px-60 d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<button class="btn nav-link dropdown-toggle py-0 px-0 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn nav-link dropdown-toggle py-0 px-0 w-px-30 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<ul class="dropdown-menu dropdown-menu-end">
Expand Down
4 changes: 2 additions & 2 deletions partials/ThemeToggle.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="dropdown dropdown-theme">
<button class="btn btn-top-nav dropdown-toggle d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn btn-top-nav dropdown-toggle w-px-60 d-md-none" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<button class="btn nav-link dropdown-toggle py-0 px-0 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<button class="btn nav-link dropdown-toggle py-0 px-0 w-px-30 d-none d-md-block" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
<span class="theme-icon-active"><i></i></span>
</button>
<ul class="dropdown-menu dropdown-menu-end">
Expand Down
4 changes: 4 additions & 0 deletions scss/_theme-toggle.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.dropdown-theme {
.dropdown-toggle {
text-decoration: none !important;
}

.dropdown-item {
&.active {
i.d-none {
Expand Down
Loading

0 comments on commit a506492

Please sign in to comment.