Permalink
Browse files

feat: responsive caption settings (#5534)

When responsive mode is set, make the caption settings dialog be more responsive to the size of the player.
Make whitespace and sizing a bit more consistent across elements.
  • Loading branch information...
BrandonOCasey authored and gkatsev committed Nov 14, 2018
1 parent ab0e29a commit b67fe271ba3f024b44a99039ba5887fecbbf1f24
Showing with 24 additions and 13 deletions.
  1. +24 −13 src/css/components/_captions-settings.scss
@@ -26,30 +26,36 @@
.vjs-text-track-settings .vjs-modal-dialog-content {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr auto;
grid-template-rows: 1fr;
// Flex and Grid for Firefox, IE, and Edge remove the bottom padding/margin in a container as size decreases
// so we add bottom padding/margin to the last item in the grid instead of here
// see https://stackoverflow.com/a/23754080
padding: 20px 24px 0px 24px;
}

.vjs-text-track-settings .vjs-track-settings-colors {
display: block;
grid-column: 1;
grid-row: 1;
}

.vjs-text-track-settings .vjs-track-settings-font {
grid-column: 2;
grid-row: 1;
// see the comment for padding above
.vjs-track-settings-controls .vjs-default-button {
margin-bottom: 20px;
}

.vjs-text-track-settings .vjs-track-settings-controls {
grid-column: 2;
grid-row: 2;
// make this take up both columns
grid-column: 1 / -1;
}

// 1 column for small players
.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content ,
.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,
.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content {
grid-template-columns: 1fr;
}

}

// Form elements
.vjs-track-setting > select {
margin-right: 5px;
margin-right: 1em;
margin-bottom: 0.5em;
}

.vjs-text-track-settings fieldset {
@@ -62,6 +68,11 @@
display: inline-block;
}

// style the second select for text colors
.vjs-text-track-settings fieldset span > select {
max-width: 7.3em;
}

.vjs-text-track-settings legend {
color: $primary-foreground-color;
margin: 0 0 5px 0;

0 comments on commit b67fe27

Please sign in to comment.