Skip to content

Commit

Permalink
Fix disappearing Youtube video
Browse files Browse the repository at this point in the history
- on this page https://www.gov.uk/government/publications/electronic-travel-authorisation-eta-help-videos/what-is-an-eta-video there is only an embedded video, which does not appear on mobile
- this seems to be due to the `.offset-empty-contents-list` class, which floats the main column right if there is no contents list on the left to push it across
- however below desktop this styling persists, when all the grid columns should have collapsed
- somehow if there is only a Youtube video present in this floated element, it produces an element with zero width, so the video is effectively invisible
- adjusting the class to only apply on desktop seems to fix the issue
  • Loading branch information
andysellick committed Nov 12, 2024
1 parent 0b19347 commit 6aed2ba
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/assets/stylesheets/views/_html-publication.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@
}

.offset-empty-contents-list {
float: right;
// stylelint-disable max-nesting-depth
@include govuk-media-query($from: desktop) {
float: right;

.direction-rtl & {
float: left;
.direction-rtl & {
float: left;
}
}
// stylelint-enable max-nesting-depth
}

.meta-data {
Expand Down

0 comments on commit 6aed2ba

Please sign in to comment.