forked from chocolatey/choco-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#429) General accessibility enhancements
This includes some general accessibility enhancements like increased spacing, link styles, and other minor changes to improve the overall accessibility of choco-theme.
- Loading branch information
Showing
15 changed files
with
126 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export const tabAnchors = () => { | ||
if (location.hash) { | ||
const activeTab = document.querySelector(`[data-bs-target="${location.hash}"]`); | ||
|
||
if (activeTab) { | ||
bootstrap.Tab.getOrCreateInstance(activeTab).show(); | ||
} | ||
} | ||
|
||
document.querySelectorAll('button[data-bs-toggle="tab"]:not(.d-anchor-none)').forEach(button => { | ||
button.addEventListener('click', () => { | ||
const target = button.getAttribute('data-bs-target'); | ||
history.pushState(null, '', `${target}`); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.sortable-item { | ||
&:focus-visible { | ||
outline: none; | ||
} | ||
|
||
&:hover .card { | ||
cursor: grab; | ||
box-shadow: inset 0 0 0 1px var(--bs-primary); // using box-shadow vs. border to prevent text layout shifts | ||
} | ||
|
||
&.sortable-chosen { | ||
cursor: grabbing; | ||
} | ||
|
||
&:hover, | ||
&.sortable-chosen, | ||
&.sortable-focused { | ||
.card { | ||
background-color: rgba(var(--bs-primary-rgb),.1) !important; | ||
text-shadow: 0.5px 0 0 currentColor; // using text-shadow vs. bold to prevent text from layout shifts | ||
} | ||
} | ||
|
||
&.sortable-chosen, | ||
&.sortable-focused, | ||
&.sortable-drag { | ||
.card { | ||
box-shadow: inset 0 0 0 3px var(--bs-primary); // using box-shadow vs. border to prevent text layout shifts | ||
} | ||
} | ||
|
||
&.sortable-ghost { | ||
.card { | ||
box-shadow: none; | ||
background: rgba(var(--bs-success-rgb),.1) !important; | ||
outline: 3px dashed var(--bs-success) !important; | ||
} | ||
} | ||
|
||
.btn-reorder.btn-outline-secondary:focus { | ||
background-color: var(--bs-btn-hover-bg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters