-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Set media viewers' settings menu dimensions with javascript (#116)
This fixes a bug for when the localized items in the menu would not fit in the menu's fixed width size set by CSS. This will also pave the way for adding more dynamic submenus, e.g. when there are a variable number of subtitles or audio tracks. We could have made the width/height dynamically adjust using width=auto or height=auto. But then CSS transitions don't work. So I resort to a small amount of javascript in this commit to adjust dimensions dynamically. Also, in order to have labels and values all be vertically aligned as a column, I use CSS to give a table layout (display: table). This brings an additional advantage for screen-readers - the label text (e.g. SPEED) is no longer seen as in-line with the value (e.g. Normal), so screen-readers will read them as separate words.
- Loading branch information
Showing
3 changed files
with
102 additions
and
97 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
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