Skip to content

Commit

Permalink
fix(FEC-7225): media queries drop in favor of top player size class (#71
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Dvir Hazout authored and Dan Ziv committed Oct 3, 2017
1 parent 413f8f3 commit 97fa361
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 13 deletions.
8 changes: 6 additions & 2 deletions src/components/bottom-bar/_bottom-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@
opacity: 0;
}

@media screen and (max-width: 480px) {
.player .bottom-bar {
.player.size-sm {
.bottom-bar {
padding: 6px 8px;

.time-display {
padding-left: 0;
}
}
}
2 changes: 1 addition & 1 deletion src/components/cvaa-overlay/_cvaa-overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
}

@media screen and (max-width: 480px) {
.player.size-sm {
.overlay.cvaa-overlay {
.sample {
width: 30%;
Expand Down
2 changes: 1 addition & 1 deletion src/components/live-tag/_live-tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
}

@media screen and (max-width: 480px) {
.player.size-sm {
.live-tag {
margin-left: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/overlay/_overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
}

@media screen and (max-width: 768px) {
.player.size-md {
.overlay {
.overlay-contents {
padding: 36px 20px;
Expand All @@ -71,7 +71,7 @@
}
}

@media screen and (max-width: 480px) {
.player.size-sm {
.overlay {
.overlay-contents {
padding: 16px 24px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/play-pause/_play-pause.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
}

@media screen and (max-width: 480px) {
.player.size-sm {
.control-button-container.control-play-pause {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/play-pause/play-pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class PlayPauseControl extends BaseComponent {
* @returns {React$Element} - component element
* @memberof PlayPauseControl
*/
render(props: any): React$Element<any> {
render(props: any): React$Element<any> | void {
var controlButtonClass = this.isPlayingAdOrPlayback() ? 'control-button is-playing' : 'control-button';

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/seekbar/_seekbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
}
}

@media screen and (max-width: 480px) {
.player.size-sm {
.virtual-progress, .time-preview, .frame-preview {
display: none;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/share-overlay/_share-overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@
transform: scale(1.1667);
}

@media screen and (max-width: 768px) {
.player.size-md {
.overlay.share-overlay {
.share-icons {
margin: 40px 0;
}
}
}

@media screen and (max-width: 480px) {
.player.size-sm {
.overlay.share-overlay {
.share-icons {
margin: 20px 0;
Expand Down
2 changes: 2 additions & 0 deletions src/components/shell/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ class Shell extends BaseComponent {
if (this.props.metadataLoaded) playerClasses += ` metadata-loaded`;
if (this.props.adBreak) playerClasses += ` ad-break`;
if (this.props.metadataLoaded) playerClasses += ` state-${this.props.currentState}`;
if (this.props.playerWidth <= 480) playerClasses += ' size-sm';
else if (this.props.playerWidth <= 768) playerClasses += ' size-md';

return (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/time-display/_time-display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
padding-left: 0;
}

@media screen and (max-width: 480px) {
.player.size-sm {
.player .time-display {
padding: 0 12px 0 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/top-bar/_top-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
opacity: 0;
}

@media screen and (max-width: 480px) {
.player.size-sm {
.player .top-bar {
padding: 8px 8px 20px 8px;
}
Expand Down

0 comments on commit 97fa361

Please sign in to comment.