summaryrefslogtreecommitdiff
path: root/ext/css/display.css
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-15 21:34:10 -0500
committerGitHub <noreply@github.com>2021-02-15 21:34:10 -0500
commit55f5182ca93778b74105c9c9097174d3138cad9e (patch)
treefd02c62d1de5accd2a4d1ddfa37cd5a568314ce5 /ext/css/display.css
parentf2a387237bac02d93d1664ed7acb6a10108915b6 (diff)
Audio popup menu primary card audio selection (#1406)
* Add card icon to audio menu items * Update cache data format * Create _getCacheItem * Add _playAudioFromSource function * Implement default card audio info * Specify exact audio to download when an override is assigned * Abstract using _getMenuItemSourceInfo * Update downloadability check * Update the main audio menu buttons to also assign the default source
Diffstat (limited to 'ext/css/display.css')
-rw-r--r--ext/css/display.css38
1 files changed, 37 insertions, 1 deletions
diff --git a/ext/css/display.css b/ext/css/display.css
index 607368fc..7953f6ef 100644
--- a/ext/css/display.css
+++ b/ext/css/display.css
@@ -1670,7 +1670,7 @@ button.footer-notification-close-button:active {
/* Audio menu */
-.audio-button-popup-menu[data-show-icons=false] .popup-menu-item-icon {
+.audio-button-popup-menu[data-show-icons=false] .popup-menu-item-audio-button .popup-menu-item-icon {
display: none;
}
.audio-button-popup-menu .popup-menu-item-icon[data-icon=checkmark] {
@@ -1682,6 +1682,42 @@ button.footer-notification-close-button:active {
.audio-button-popup-menu .popup-menu-item-group[data-source-in-options=false][data-valid=null] .popup-menu-item {
color: var(--text-color-light1);
}
+.popup-menu-item-audio-button .popup-menu-item-label {
+ padding-right: 2.5em;
+}
+.popup-menu-item-set-primary-audio-button {
+ flex-flow: row nowrap;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ width: 2.5em;
+}
+.popup-menu-item-set-primary-audio-button:not([hidden]) {
+ display: flex;
+}
+.popup-menu-item-set-primary-audio-button .popup-menu-item-icon {
+ opacity: 0;
+ transition: opacity var(--animation-duration) linear;
+}
+.popup-menu-item-group:hover .popup-menu-item-set-primary-audio-button .popup-menu-item-icon {
+ opacity: 0.25;
+}
+.popup-menu-item-group .popup-menu-item-set-primary-audio-button:hover .popup-menu-item-icon,
+.popup-menu-item-group .popup-menu-item-set-primary-audio-button:active .popup-menu-item-icon,
+.popup-menu-item-group .popup-menu-item-set-primary-audio-button:focus .popup-menu-item-icon {
+ opacity: 0.375;
+}
+.popup-menu-item-group[data-is-primary-card-audio=true] .popup-menu-item-set-primary-audio-button .popup-menu-item-icon {
+ opacity: 1;
+}
+.popup-menu-item-group[data-is-primary-card-audio=true] .popup-menu-item-set-primary-audio-button:hover .popup-menu-item-icon,
+.popup-menu-item-group[data-is-primary-card-audio=true] .popup-menu-item-set-primary-audio-button:active .popup-menu-item-icon,
+.popup-menu-item-group[data-is-primary-card-audio=true] .popup-menu-item-set-primary-audio-button:focus .popup-menu-item-icon {
+ opacity: 1;
+}
/* Anki errors */